Skip to content

Commit

Permalink
Prepare for typescript support by moving all the js files into a js f…
Browse files Browse the repository at this point in the history
…older
  • Loading branch information
NullVoxPopuli committed Sep 25, 2024
1 parent 6ec50f8 commit 2632e9c
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export default [
{
files: [
'files/app/**/*.js',
'files-override/app/**/*.js',
'files-override/tests/**/*.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 2632e9c

Please sign in to comment.