Skip to content

Commit

Permalink
Add --typescript to ecu config
Browse files Browse the repository at this point in the history
  • Loading branch information
simonihmig committed Jul 21, 2022
1 parent a5c7267 commit 46a3379
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ const { merge } = require('lodash');

let date = new Date();

const ADDON_OPTIONS = ['addonLocation', 'testAppLocation', 'testAppName', 'releaseIt'];
const ADDON_OPTIONS = [
'addonLocation',
'testAppLocation',
'testAppName',
'releaseIt',
];

const description = 'The default blueprint for Embroider v2 addons.';

Expand All @@ -32,7 +37,9 @@ module.exports = {
const appBlueprint = this.lookupBlueprint('app');

if (!appBlueprint) {
throw new SilentError('Cannot find app blueprint for generating test-app!');
throw new SilentError(
'Cannot find app blueprint for generating test-app!'
);
}

let testAppInfo = testAppInfoFromOptions(options);
Expand Down Expand Up @@ -85,7 +92,10 @@ module.exports = {
// we must explicitly add our own v2 addon here, the implicit magic of the legacy dummy app does not work
pkg.devDependencies[this.locals(this.options).addonName] = '^0.0.0';

return fs.writeFile(packageJsonPath, JSON.stringify(sortPackageJson(pkg), undefined, 2));
return fs.writeFile(
packageJsonPath,
JSON.stringify(sortPackageJson(pkg), undefined, 2)
);
},

async overrideTestAppFiles(testAppPath, overridesPath) {
Expand Down Expand Up @@ -134,10 +144,13 @@ module.exports = {
options.welcome && '"--welcome"',
options.yarn && '"--yarn"',
options.ciProvider && `"--ci-provider=${options.ciProvider}"`,
options.addonLocation && `"--addon-location=${options.addonLocation}"`,
options.testAppLocation && `"--test-app-location=${options.testAppLocation}"`,
options.addonLocation &&
`"--addon-location=${options.addonLocation}"`,
options.testAppLocation &&
`"--test-app-location=${options.testAppLocation}"`,
options.testAppName && `"--test-app-name=${options.testAppName}"`,
options.releaseIt && `"--release-it"`,
options.typescript && `"--typescript"`,
]
.filter(Boolean)
.join(',\n ') +
Expand Down

0 comments on commit 46a3379

Please sign in to comment.