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

Updated blueprints #66

Merged
merged 3 commits into from
Sep 14, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
feature: Downstreamed changes from @embroider/addon-blueprint@2.5.0 a…
…nd ember-cli@5.2.0
ijlee2 committed Sep 14, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 6c4caa292e80ce00650f7984438a9874e0dc2126
Original file line number Diff line number Diff line change
@@ -7,7 +7,10 @@ module.exports = function (defaults) {
// Add options here
autoImport: {
watchDependencies: ['<%= options.packages.addon.name %>'],
},
},<% if (options.packages.addon.hasTypeScript) { %>
'ember-cli-babel': {
enableTypeScriptTransform: true,
},<% } %>
Comment on lines +10 to +13
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Downstreamed from ember-cli/ember-cli#10283

});

const { maybeEmbroider } = require('@embroider/test-setup');
2 changes: 2 additions & 0 deletions src/steps/update-addon-tsconfig-json.ts
Original file line number Diff line number Diff line change
@@ -19,9 +19,11 @@ function updateCompilerOptions(

if (packages.addon.hasGlint) {
compilerOptions.set('allowImportingTsExtensions', true);
compilerOptions.set('allowJs', true);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compilerOptions.set('declarationDir', 'declarations');
} else {
compilerOptions.set('allowImportingTsExtensions', true);
compilerOptions.set('allowJs', true);
compilerOptions.set('declaration', true);
compilerOptions.set('declarationDir', 'declarations');
compilerOptions.set('emitDeclarationOnly', true);
6 changes: 3 additions & 3 deletions src/steps/update-test-app-tsconfig-json.ts
Original file line number Diff line number Diff line change
@@ -23,8 +23,8 @@ function updateCompilerOptions(
tsConfigJson['compilerOptions'] = convertToObject(compilerOptions);
}

function updateInclude(tsConfigJson: TsConfigJson): void {
tsConfigJson['include'] = ['app/**/*', 'tests/**/*', 'types/**/*'];
function removeInclude(tsConfigJson: TsConfigJson) {
delete tsConfigJson['include'];
Comment on lines +26 to +27
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Downstreamed from ember-cli/ember-cli#10283

}

export function updateTestAppTsConfigJson(options: Options): void {
@@ -39,7 +39,7 @@ export function updateTestAppTsConfigJson(options: Options): void {
const tsConfigJson = JSON.parse(sanitizeJson(oldFile));

updateCompilerOptions(tsConfigJson, options);
updateInclude(tsConfigJson);
removeInclude(tsConfigJson);

const newFile = JSON.stringify(tsConfigJson, null, 2) + '\n';