Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for typescript support by moving all the js files into a js folder #81

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
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