-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for moving component classes written in TypeScript
- Loading branch information
Showing
5 changed files
with
334 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
module.exports = { | ||
app: { | ||
'app.js': '// app', | ||
|
||
components: { | ||
// A standalone component | ||
'top-level-component.ts': '// top-level-component.ts', | ||
|
||
// A nested component | ||
'parent-component.ts': '// parent-component.ts', | ||
'parent-component': { | ||
'child-component.ts': '// parent-component/child-component.ts', | ||
'child-component': { | ||
'grandchild-component.ts': '// parent-component/child-component/grandchild-component.ts' | ||
} | ||
}, | ||
|
||
// Another nested component | ||
nested1: { | ||
'nested-component.ts': '// nested1/nested-component.ts', | ||
nested2: { | ||
'super-nested-component.ts': '// nested1/nested2/super-nested-component.ts' | ||
} | ||
}, | ||
|
||
// A component with layoutName | ||
'layout-name': { | ||
'has-layout-name.ts': [ | ||
'// top-level-component.ts', | ||
'Component.extend({ layoutName: "components/layout-name/layout-name-template" });' | ||
].join('\n') | ||
} | ||
}, | ||
|
||
templates: { | ||
'application.hbs': '{{outlet}}', | ||
|
||
components: { | ||
// A standalone component | ||
'top-level-component.hbs': '{{!-- top-level-component.hbs --}}', | ||
|
||
// A template-only component | ||
'template-only-component.hbs': '{{!-- template-only-component.hbs --}}', | ||
|
||
// A nested component | ||
'parent-component.hbs': '{{!-- parent-component.hbs --}}', | ||
'parent-component': { | ||
'child-component.hbs': '{{!-- parent-component/child-component.hbs --}}', | ||
'child-component': { | ||
'grandchild-component.hbs': '{{!-- parent-component/child-component/grandchild-component.hbs --}}' | ||
} | ||
}, | ||
|
||
// Another nested component | ||
nested1: { | ||
'nested-component.hbs': '{{!-- nested1/nested-component.hbs --}}', | ||
nested2: { | ||
'super-nested-component.hbs': '{{!-- nested1/nested2/super-nested-component.hbs --}}' | ||
} | ||
}, | ||
|
||
// A component with layoutName | ||
'layout-name': { | ||
'layout-name-template.hbs': '{{!-- layout-name-template.hbs --}}' | ||
}, | ||
|
||
// A partial template | ||
'partials': { | ||
'partial-one-template.hbs': '{{!-- partial-one-template.hbs --}}', | ||
'partial-two-template.hbs': '{{!-- partial-two-template.hbs --}}', | ||
'-partial-three-template.hbs': '{{!-- partial-three-template.hbs --}}', | ||
|
||
'with-partial.hbs': [ | ||
'{{!-- with-partial.hbs --}}', | ||
'{{partial "components/partials/partial-one-template"}}', | ||
'{{partial "components/partials/partial-two-template"}}', | ||
'{{partial "components/partials/partial-three-template"}}' | ||
].join('\n') | ||
} | ||
} | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
module.exports = { | ||
app: { | ||
'app.js': '// app', | ||
|
||
components: { | ||
// A standalone component | ||
'top-level-component.hbs': '{{!-- top-level-component.hbs --}}', | ||
'top-level-component.ts': '// top-level-component.ts', | ||
|
||
// A template-only component | ||
'template-only-component.hbs': '{{!-- template-only-component.hbs --}}', | ||
|
||
// A nested component | ||
'parent-component.hbs': '{{!-- parent-component.hbs --}}', | ||
'parent-component.ts': '// parent-component.ts', | ||
'parent-component': { | ||
'child-component.hbs': '{{!-- parent-component/child-component.hbs --}}', | ||
'child-component.ts': '// parent-component/child-component.ts', | ||
'child-component': { | ||
'grandchild-component.hbs': '{{!-- parent-component/child-component/grandchild-component.hbs --}}', | ||
'grandchild-component.ts': '// parent-component/child-component/grandchild-component.ts' | ||
} | ||
}, | ||
|
||
// Another nested component | ||
nested1: { | ||
'nested-component.hbs': '{{!-- nested1/nested-component.hbs --}}', | ||
'nested-component.ts': '// nested1/nested-component.ts', | ||
nested2: { | ||
'super-nested-component.hbs': '{{!-- nested1/nested2/super-nested-component.hbs --}}', | ||
'super-nested-component.ts': '// nested1/nested2/super-nested-component.ts' | ||
} | ||
}, | ||
|
||
// A component with layoutName | ||
'layout-name': { | ||
'has-layout-name.ts': [ | ||
'// top-level-component.ts', | ||
'Component.extend({ layoutName: "components/layout-name/layout-name-template" });' | ||
].join('\n') | ||
}, | ||
|
||
// A component with partial | ||
'partials': { | ||
'with-partial.hbs': [ | ||
'{{!-- with-partial.hbs --}}', | ||
'{{partial "components/partials/partial-one-template"}}', | ||
'{{partial "components/partials/partial-two-template"}}', | ||
'{{partial "components/partials/partial-three-template"}}' | ||
].join('\n') | ||
} | ||
}, | ||
|
||
templates: { | ||
'application.hbs': '{{outlet}}', | ||
|
||
components: { | ||
// A component with layoutName | ||
'layout-name': { | ||
'layout-name-template.hbs': '{{!-- layout-name-template.hbs --}}' | ||
}, | ||
|
||
// A partial template | ||
'partials': { | ||
'partial-one-template.hbs': '{{!-- partial-one-template.hbs --}}', | ||
'partial-two-template.hbs': '{{!-- partial-two-template.hbs --}}', | ||
'-partial-three-template.hbs': '{{!-- partial-three-template.hbs --}}' | ||
} | ||
} | ||
} | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
module.exports = { | ||
app: { | ||
'app.js': '// app', | ||
|
||
components: { | ||
// A standalone component | ||
'top-level-component.ts': '// top-level-component.ts', | ||
|
||
// A nested component | ||
'parent-component.ts': '// parent-component.ts', | ||
'parent-component': { | ||
'child-component.ts': '// parent-component/child-component.ts', | ||
'child-component': { | ||
'grandchild-component.ts': '// parent-component/child-component/grandchild-component.ts' | ||
} | ||
}, | ||
|
||
// Another nested component | ||
nested1: { | ||
'nested-component.ts': '// nested1/nested-component.ts', | ||
nested2: { | ||
'super-nested-component.ts': '// nested1/nested2/super-nested-component.ts' | ||
} | ||
}, | ||
|
||
// A component with layoutName | ||
'layout-name': { | ||
'has-layout-name.ts': [ | ||
'// top-level-component.ts', | ||
'Component.extend({ layoutName: "components/layout-name/layout-name-template" });' | ||
].join('\n') | ||
} | ||
}, | ||
|
||
templates: { | ||
'application.hbs': '{{outlet}}', | ||
|
||
components: { | ||
// A standalone component | ||
'top-level-component.hbs': '{{!-- top-level-component.hbs --}}', | ||
|
||
// A template-only component | ||
'template-only-component.hbs': '{{!-- template-only-component.hbs --}}', | ||
|
||
// A nested component | ||
'parent-component.hbs': '{{!-- parent-component.hbs --}}', | ||
'parent-component': { | ||
'child-component.hbs': '{{!-- parent-component/child-component.hbs --}}', | ||
'child-component': { | ||
'grandchild-component.hbs': '{{!-- parent-component/child-component/grandchild-component.hbs --}}' | ||
} | ||
}, | ||
|
||
// Another nested component | ||
nested1: { | ||
'nested-component.hbs': '{{!-- nested1/nested-component.hbs --}}', | ||
nested2: { | ||
'super-nested-component.hbs': '{{!-- nested1/nested2/super-nested-component.hbs --}}' | ||
} | ||
}, | ||
|
||
// A component with layoutName | ||
'layout-name': { | ||
'layout-name-template.hbs': '{{!-- layout-name-template.hbs --}}' | ||
}, | ||
|
||
// A partial template | ||
'partials': { | ||
'partial-one-template.hbs': '{{!-- partial-one-template.hbs --}}', | ||
'partial-two-template.hbs': '{{!-- partial-two-template.hbs --}}', | ||
'-partial-three-template.hbs': '{{!-- partial-three-template.hbs --}}', | ||
|
||
'with-partial.hbs': [ | ||
'{{!-- with-partial.hbs --}}', | ||
'{{partial "components/partials/partial-one-template"}}', | ||
'{{partial "components/partials/partial-two-template"}}', | ||
'{{partial "components/partials/partial-three-template"}}' | ||
].join('\n') | ||
} | ||
} | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
module.exports = { | ||
app: { | ||
'app.js': '// app', | ||
|
||
components: { | ||
// A standalone component | ||
'top-level-component': { | ||
'index.hbs': '{{!-- top-level-component.hbs --}}', | ||
'index.ts': '// top-level-component.ts', | ||
}, | ||
|
||
// A template-only component | ||
'template-only-component': { | ||
'index.hbs': '{{!-- template-only-component.hbs --}}' | ||
}, | ||
|
||
// A nested component | ||
'parent-component': { | ||
'index.hbs': '{{!-- parent-component.hbs --}}', | ||
'index.ts': '// parent-component.ts', | ||
'child-component': { | ||
'index.hbs': '{{!-- parent-component/child-component.hbs --}}', | ||
'index.ts': '// parent-component/child-component.ts', | ||
'grandchild-component': { | ||
'index.hbs': '{{!-- parent-component/child-component/grandchild-component.hbs --}}', | ||
'index.ts': '// parent-component/child-component/grandchild-component.ts' | ||
} | ||
} | ||
}, | ||
|
||
// Another nested component | ||
nested1: { | ||
'nested-component': { | ||
'index.hbs': '{{!-- nested1/nested-component.hbs --}}', | ||
'index.ts': '// nested1/nested-component.ts', | ||
}, | ||
nested2: { | ||
'super-nested-component': { | ||
'index.hbs': '{{!-- nested1/nested2/super-nested-component.hbs --}}', | ||
'index.ts': '// nested1/nested2/super-nested-component.ts' | ||
} | ||
} | ||
}, | ||
|
||
// A component with layoutName | ||
'layout-name': { | ||
'has-layout-name.ts': [ | ||
'// top-level-component.ts', | ||
'Component.extend({ layoutName: "components/layout-name/layout-name-template" });' | ||
].join('\n') | ||
}, | ||
|
||
// A component with partial | ||
'partials': { | ||
'with-partial': { | ||
'index.hbs': [ | ||
'{{!-- with-partial.hbs --}}', | ||
'{{partial "components/partials/partial-one-template"}}', | ||
'{{partial "components/partials/partial-two-template"}}', | ||
'{{partial "components/partials/partial-three-template"}}' | ||
].join('\n') | ||
} | ||
} | ||
}, | ||
|
||
templates: { | ||
'application.hbs': '{{outlet}}', | ||
|
||
components: { | ||
// A component with layoutName | ||
'layout-name': { | ||
'layout-name-template.hbs': '{{!-- layout-name-template.hbs --}}' | ||
}, | ||
|
||
// A partial template | ||
'partials': { | ||
'partial-one-template.hbs': '{{!-- partial-one-template.hbs --}}', | ||
'partial-two-template.hbs': '{{!-- partial-two-template.hbs --}}', | ||
'-partial-three-template.hbs': '{{!-- partial-three-template.hbs --}}' | ||
} | ||
} | ||
} | ||
}, | ||
}; |