Skip to content

Commit

Permalink
Merge pull request #81 from embroider-build/prepare-for-typescript-su…
Browse files Browse the repository at this point in the history
…pport

Prepare for typescript support by moving all the js files into a js folder
  • Loading branch information
NullVoxPopuli authored Sep 25, 2024
2 parents 6ec50f8 + e2d0c23 commit 3e4aa11
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 4 deletions.
6 changes: 3 additions & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export default [
},
{
files: [
'files/app/**/*.js',
'files-override/app/**/*.js',
'files-override/tests/**/*.js',
'files/*/app/**/*.js',
'files-override/*/app/**/*.js',
'files-override/*/tests/**/*.js',
],
languageOptions: {
sourceType: 'module',
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 14 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ module.exports = {
locals(options) {
return appBlueprint.locals(options);
},

/**
* NOTE: we can't have a "shared" file here,
* as we can with files-override
*/
filesPath(options) {
if (options.typescript) {
throw new Error(`TypeScript is not yet supported`);
}

return join(this.path, 'files/js');
},

beforeInstall(options) {
if (!appBlueprint) {
throw new Error('Cannot find app blueprint for generating test-app!');
Expand Down Expand Up @@ -76,7 +89,7 @@ module.exports = {
// there doesn't seem to be a way to tell ember-cli to not prompt to override files that were added in the beforeInstall
// so I'm just copying a few over at this stage
copyWithTemplate(
join(__dirname, 'files-override'),
join(__dirname, 'files-override/js'),
options.target,
options,
);
Expand Down

0 comments on commit 3e4aa11

Please sign in to comment.