ember-cli 4.8.0-beta.0 → 4.9.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -3
- package/LICENSE +1 -1
- package/bin/ember +3 -0
- package/blueprints/addon/additional-package.json +19 -0
- package/blueprints/addon/files/npmignore +0 -1
- package/blueprints/addon/index.js +18 -18
- package/blueprints/app/files/.ember-cli +3 -3
- package/blueprints/app/files/.eslintrc.js +12 -3
- package/blueprints/app/files/app/{app.js → app.ts} +0 -0
- package/blueprints/app/files/app/{router.js → router.ts} +3 -1
- package/blueprints/app/files/config/environment.js +1 -0
- package/blueprints/app/files/package.json +20 -17
- package/blueprints/app/files/tests/helpers/{index.js → index.ts} +4 -3
- package/blueprints/app/files/tests/{test-helper.js → test-helper.ts} +0 -0
- package/blueprints/app/index.js +10 -0
- package/docs/build/data.json +44 -44
- package/lib/commands/addon.js +1 -0
- package/lib/commands/destroy.js +1 -1
- package/lib/commands/generate.js +2 -10
- package/lib/commands/init.js +1 -0
- package/lib/commands/new.js +32 -4
- package/lib/models/asset-size-printer.js +1 -1
- package/lib/models/blueprint.js +24 -1
- package/lib/models/builder.js +13 -6
- package/lib/models/project.js +3 -1
- package/lib/models/server-watcher.js +2 -2
- package/lib/models/watcher.js +23 -6
- package/lib/tasks/build-watch.js +9 -7
- package/lib/tasks/generate-from-blueprint.js +1 -1
- package/lib/tasks/install-blueprint.js +1 -1
- package/lib/tasks/interactive-new.js +153 -0
- package/lib/tasks/npm-task.js +1 -1
- package/lib/tasks/serve.js +10 -8
- package/lib/utilities/find-build-file.js +17 -9
- package/lib/utilities/lint-fix.js +11 -10
- package/package.json +12 -10
- package/blueprints/addon/additional-dev-dependencies.json +0 -8
- package/blueprints/addon/files/addon-config/environment.js +0 -5
- package/blueprints/app/files/vendor/.gitkeep +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,45 @@
|
|
|
1
1
|
# ember-cli Changelog
|
|
2
2
|
|
|
3
|
-
## v4.
|
|
3
|
+
## v4.9.0-beta.0
|
|
4
4
|
|
|
5
5
|
#### Blueprint Changes
|
|
6
6
|
|
|
7
|
-
- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v4.
|
|
8
|
-
- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v4.
|
|
7
|
+
- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v4.8.0...v4.9.0-beta.0)
|
|
8
|
+
- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v4.8.0...v4.9.0-beta.0)
|
|
9
9
|
|
|
10
10
|
#### Changelog
|
|
11
11
|
|
|
12
|
+
- [#10015](https://github.com/ember-cli/ember-cli/pull/10015) Update `glob` to v8 [@bertdeblock](https://github.com/bertdeblock)
|
|
13
|
+
- [#10016](https://github.com/ember-cli/ember-cli/pull/10016) Fix indentation in `.ember-cli` file in `app` blueprint [@bertdeblock](https://github.com/bertdeblock)
|
|
14
|
+
- [#10017](https://github.com/ember-cli/ember-cli/pull/10017) [ENHANCEMENT] Disable prototype extensions by default in `app` blueprint [@bertdeblock](https://github.com/bertdeblock)
|
|
15
|
+
- [#10018](https://github.com/ember-cli/ember-cli/pull/10018) Trap unhandled failures [@ef4](https://github.com/ef4)
|
|
16
|
+
- [#10020](https://github.com/ember-cli/ember-cli/pull/10020) [INTERNAL] Fix typos in `serve` command test [@bertdeblock](https://github.com/bertdeblock)
|
|
17
|
+
- [#10021](https://github.com/ember-cli/ember-cli/pull/10021) [CLEANUP] Drop support for using `usePods: true` and the `--pod` flag simultaneously [@bertdeblock](https://github.com/bertdeblock)
|
|
18
|
+
- [#10022](https://github.com/ember-cli/ember-cli/pull/10022) [ENHANCEMENT] Use `concurrently` instead of `npm-run-all` in `app` blueprint [@bertdeblock](https://github.com/bertdeblock)
|
|
19
|
+
- [#10024](https://github.com/ember-cli/ember-cli/pull/10024) [ENHANCEMENT] Add `ember-source` to `peerDependencies` in `addon` blueprint [@bertdeblock](https://github.com/bertdeblock)
|
|
20
|
+
- [#10025](https://github.com/ember-cli/ember-cli/pull/10025) [ENHANCEMENT] Update NPM version constraints [@bertdeblock](https://github.com/bertdeblock)
|
|
21
|
+
- [#10026](https://github.com/ember-cli/ember-cli/pull/10026) [ENHANCEMENT] Display info message when running the `lint:fix` script post blueprint generation [@bertdeblock](https://github.com/bertdeblock)
|
|
22
|
+
- [#10038](https://github.com/ember-cli/ember-cli/pull/10038) Update `filesize` to v10 [@bertdeblock](https://github.com/bertdeblock)
|
|
23
|
+
- [#10041](https://github.com/ember-cli/ember-cli/pull/10041) [INTERNAL] Remove end year from copyright notice [@bertdeblock](https://github.com/bertdeblock)
|
|
24
|
+
- [#10049](https://github.com/ember-cli/ember-cli/pull/10049) [ENHANCEMENT] Remove the `config/environment.js` file from the `addon` blueprint [@bertdeblock](https://github.com/bertdeblock)
|
|
25
|
+
- [#10050](https://github.com/ember-cli/ember-cli/pull/10050) [ENHANCEMENT] Remove `vendor` folder from `app` blueprint [@bertdeblock](https://github.com/bertdeblock)
|
|
26
|
+
- [#10051](https://github.com/ember-cli/ember-cli/pull/10051) [ENHANCEMENT] Move `ember-try.js` config file to `tests/dummy/config/ember-try.js` for addons [@bertdeblock](https://github.com/bertdeblock)
|
|
27
|
+
- [#10053](https://github.com/ember-cli/ember-cli/pull/10053) Add support for node ESM addons [@hjdivad](https://github.com/hjdivad)
|
|
28
|
+
- [#9824](https://github.com/ember-cli/ember-cli/pull/9824) [RFC 638] Interactive way to create new Ember apps and addons [@bertdeblock](https://github.com/bertdeblock)
|
|
29
|
+
- [#9972](https://github.com/ember-cli/ember-cli/pull/9972) [ENHANCEMENT] Add support for `--typescript` flag to `app` and `addon` blueprints [@simonihmig](https://github.com/simonihmig)
|
|
30
|
+
|
|
31
|
+
Thank you to all who took the time to contribute!
|
|
32
|
+
|
|
33
|
+
## v4.8.0
|
|
34
|
+
|
|
35
|
+
#### Blueprint Changes
|
|
36
|
+
|
|
37
|
+
- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v4.7.0...v4.8.0)
|
|
38
|
+
- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v4.7.0...v4.8.0)
|
|
39
|
+
|
|
40
|
+
#### Changelog
|
|
41
|
+
|
|
42
|
+
- [#10014](https://github.com/ember-cli/ember-cli/pull/10014) [BUGFIX release] Make sure newly installed addons are discovered when running `ember install` [@bertdeblock](https://github.com/bertdeblock)
|
|
12
43
|
- [#9920](https://github.com/ember-cli/ember-cli/pull/9920) [BUGFIX] Make sure a blueprint’s options object and project instance are always available for all public hooks [@bertdeblock](https://github.com/bertdeblock)
|
|
13
44
|
- [#9945](https://github.com/ember-cli/ember-cli/pull/9945) [ENHANCEMENT/BREAKING] Add Node v18 to `engines` in `app` and `addon` blueprint (removes support for Node v17) [@bertdeblock](https://github.com/bertdeblock)
|
|
14
45
|
- [#9946](https://github.com/ember-cli/ember-cli/pull/9946) [INTERNAL] Unskip `package-info-cache` tests [@bertdeblock](https://github.com/bertdeblock)
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2013
|
|
3
|
+
Copyright (c) 2013 Stefan Penner, Robert Jackson and ember-cli contributors
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/bin/ember
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"keywords": [
|
|
3
|
+
"ember-addon"
|
|
4
|
+
],
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test:ember-compatibility": "ember try:each"
|
|
7
|
+
},
|
|
8
|
+
"devDependencies": {
|
|
9
|
+
"@embroider/test-setup": "^1.8.3",
|
|
10
|
+
"ember-source-channel-url": "^3.0.0",
|
|
11
|
+
"ember-try": "^2.0.0"
|
|
12
|
+
},
|
|
13
|
+
"peerDependencies": {
|
|
14
|
+
"ember-source": "^3.28.0 || ^4.0.0"
|
|
15
|
+
},
|
|
16
|
+
"ember-addon": {
|
|
17
|
+
"configPath": "tests/dummy/config"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -5,7 +5,7 @@ const path = require('path');
|
|
|
5
5
|
const walkSync = require('walk-sync');
|
|
6
6
|
const chalk = require('chalk');
|
|
7
7
|
const stringUtil = require('ember-cli-string-utils');
|
|
8
|
-
const { uniq } = require('ember-cli-lodash-subset');
|
|
8
|
+
const { merge, uniq } = require('ember-cli-lodash-subset');
|
|
9
9
|
const SilentError = require('silent-error');
|
|
10
10
|
const sortPackageJson = require('sort-package-json');
|
|
11
11
|
|
|
@@ -22,13 +22,15 @@ const replacers = {
|
|
|
22
22
|
},
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
const
|
|
25
|
+
const ADDITIONAL_PACKAGE = require('./additional-package.json');
|
|
26
26
|
|
|
27
27
|
const description = 'The default blueprint for ember-cli addons.';
|
|
28
28
|
module.exports = {
|
|
29
29
|
description,
|
|
30
30
|
appBlueprintName: 'app',
|
|
31
31
|
|
|
32
|
+
shouldTransformTypeScript: true,
|
|
33
|
+
|
|
32
34
|
filesToRemove: [
|
|
33
35
|
'tests/dummy/app/styles/.gitkeep',
|
|
34
36
|
'tests/dummy/app/templates/.gitkeep',
|
|
@@ -43,9 +45,9 @@ module.exports = {
|
|
|
43
45
|
|
|
44
46
|
contents.name = stringUtil.dasherize(this.options.entity.name);
|
|
45
47
|
contents.description = this.description;
|
|
48
|
+
|
|
46
49
|
delete contents.private;
|
|
47
|
-
|
|
48
|
-
contents.keywords = contents.keywords || [];
|
|
50
|
+
|
|
49
51
|
contents.dependencies = contents.dependencies || {};
|
|
50
52
|
contents.devDependencies = contents.devDependencies || {};
|
|
51
53
|
|
|
@@ -67,17 +69,7 @@ module.exports = {
|
|
|
67
69
|
// 100% of addons don't need ember-cli-app-version, make it opt-in instead
|
|
68
70
|
delete contents.devDependencies['ember-cli-app-version'];
|
|
69
71
|
|
|
70
|
-
|
|
71
|
-
contents.keywords.push('ember-addon');
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
Object.assign(contents.devDependencies, ADDITIONAL_DEV_DEPENDENCIES);
|
|
75
|
-
|
|
76
|
-
// add `ember-compatibility` script in addons
|
|
77
|
-
contents.scripts['test:ember-compatibility'] = 'ember try:each';
|
|
78
|
-
|
|
79
|
-
contents['ember-addon'] = contents['ember-addon'] || {};
|
|
80
|
-
contents['ember-addon'].configPath = 'tests/dummy/config';
|
|
72
|
+
merge(contents, ADDITIONAL_PACKAGE);
|
|
81
73
|
|
|
82
74
|
return stringifyAndNormalize(sortPackageJson(contents));
|
|
83
75
|
},
|
|
@@ -110,13 +102,20 @@ module.exports = {
|
|
|
110
102
|
this.ui.writeLine(prependEmoji('✨', `Creating a new Ember addon in ${chalk.yellow(process.cwd())}:`));
|
|
111
103
|
},
|
|
112
104
|
|
|
113
|
-
afterInstall() {
|
|
105
|
+
async afterInstall(options) {
|
|
114
106
|
let packagePath = path.join(this.path, 'files', 'package.json');
|
|
115
107
|
let bowerPath = path.join(this.path, 'files', 'bower.json');
|
|
116
108
|
|
|
117
109
|
[packagePath, bowerPath].forEach((filePath) => {
|
|
118
110
|
fs.removeSync(filePath);
|
|
119
111
|
});
|
|
112
|
+
|
|
113
|
+
if (options.typescript) {
|
|
114
|
+
await this.addAddonToProject({
|
|
115
|
+
name: 'ember-cli-typescript',
|
|
116
|
+
blueprintOptions: { ...options, save: true },
|
|
117
|
+
});
|
|
118
|
+
}
|
|
120
119
|
},
|
|
121
120
|
|
|
122
121
|
locals(options) {
|
|
@@ -142,6 +141,7 @@ module.exports = {
|
|
|
142
141
|
options.welcome && '"--welcome"',
|
|
143
142
|
options.yarn && '"--yarn"',
|
|
144
143
|
options.ciProvider && `"--ci-provider=${options.ciProvider}"`,
|
|
144
|
+
options.typescript && `"--typescript"`,
|
|
145
145
|
]
|
|
146
146
|
.filter(Boolean)
|
|
147
147
|
.join(',\n ') +
|
|
@@ -164,6 +164,7 @@ module.exports = {
|
|
|
164
164
|
embroider: false,
|
|
165
165
|
lang: options.lang,
|
|
166
166
|
ciProvider: options.ciProvider,
|
|
167
|
+
typescript: options.typescript,
|
|
167
168
|
};
|
|
168
169
|
},
|
|
169
170
|
|
|
@@ -188,8 +189,7 @@ module.exports = {
|
|
|
188
189
|
'^config.*': 'tests/dummy/:path',
|
|
189
190
|
'^public.*': 'tests/dummy/:path',
|
|
190
191
|
|
|
191
|
-
'^addon-config/
|
|
192
|
-
'^addon-config/ember-try.js': 'config/ember-try.js',
|
|
192
|
+
'^addon-config/ember-try.js': 'tests/dummy/config/ember-try.js',
|
|
193
193
|
|
|
194
194
|
'^npmignore': '.npmignore',
|
|
195
195
|
},
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"disableAnalytics": false,
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
|
|
12
|
+
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
|
|
13
13
|
*/
|
|
14
|
-
"isTypeScriptProject": false
|
|
14
|
+
"isTypeScriptProject": <%= typescript ? 'true' : 'false' %>
|
|
15
15
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
root: true,
|
|
5
|
-
parser: 'babel-eslint',
|
|
5
|
+
parser: '<%= typescript ? '@typescript-eslint/parser' : 'babel-eslint' %>',
|
|
6
6
|
parserOptions: {
|
|
7
7
|
ecmaVersion: 2018,
|
|
8
8
|
sourceType: 'module',
|
|
@@ -10,7 +10,7 @@ module.exports = {
|
|
|
10
10
|
legacyDecorators: true,
|
|
11
11
|
},
|
|
12
12
|
},
|
|
13
|
-
plugins: ['ember'],
|
|
13
|
+
plugins: ['ember'<% if (typescript) { %>, '@typescript-eslint'<% } %>],
|
|
14
14
|
extends: [
|
|
15
15
|
'eslint:recommended',
|
|
16
16
|
'plugin:ember/recommended',
|
|
@@ -21,7 +21,16 @@ module.exports = {
|
|
|
21
21
|
},
|
|
22
22
|
rules: {},
|
|
23
23
|
overrides: [
|
|
24
|
-
//
|
|
24
|
+
<% if (typescript) { %> // ts files
|
|
25
|
+
{
|
|
26
|
+
files: ['**/*.ts'],
|
|
27
|
+
extends: [
|
|
28
|
+
'plugin:@typescript-eslint/eslint-recommended',
|
|
29
|
+
'plugin:@typescript-eslint/recommended',
|
|
30
|
+
],
|
|
31
|
+
rules: {},
|
|
32
|
+
},
|
|
33
|
+
<% } %> // node files
|
|
25
34
|
{
|
|
26
35
|
files: [
|
|
27
36
|
'./.eslintrc.js',
|
|
File without changes
|
|
@@ -12,32 +12,36 @@
|
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "ember build --environment=production",
|
|
15
|
-
"lint": "
|
|
16
|
-
"lint:fix": "
|
|
15
|
+
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
|
|
16
|
+
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
|
|
17
17
|
"lint:hbs": "ember-template-lint .",
|
|
18
18
|
"lint:hbs:fix": "ember-template-lint . --fix",
|
|
19
19
|
"lint:js": "eslint . --cache",
|
|
20
|
-
"lint:js:fix": "eslint . --fix",
|
|
20
|
+
"lint:js:fix": "eslint . --fix<% if (typescript) { %>",
|
|
21
|
+
"lint:types": "tsc --noEmit<% } %>",
|
|
21
22
|
"start": "ember serve",
|
|
22
|
-
"test": "
|
|
23
|
+
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
|
|
23
24
|
"test:ember": "ember test"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
27
|
"@ember/optional-features": "^2.0.0",
|
|
27
28
|
"@ember/test-helpers": "^2.8.1<% if (embroider) { %>",
|
|
28
|
-
"@embroider/compat": "^1.
|
|
29
|
-
"@embroider/core": "^1.
|
|
30
|
-
"@embroider/webpack": "^1.
|
|
29
|
+
"@embroider/compat": "^1.9.0",
|
|
30
|
+
"@embroider/core": "^1.9.0",
|
|
31
|
+
"@embroider/webpack": "^1.9.0<% } %>",
|
|
31
32
|
"@glimmer/component": "^1.1.2",
|
|
32
|
-
"@glimmer/tracking": "^1.1.2",
|
|
33
|
-
"
|
|
33
|
+
"@glimmer/tracking": "^1.1.2<% if (typescript) { %>",
|
|
34
|
+
"@typescript-eslint/eslint-plugin": "^5.40.1",
|
|
35
|
+
"@typescript-eslint/parser": "^5.40.1<% } else { %>",
|
|
36
|
+
"babel-eslint": "^10.1.0<% } %>",
|
|
34
37
|
"broccoli-asset-rev": "^3.0.0",
|
|
35
|
-
"
|
|
38
|
+
"concurrently": "^7.4.0",
|
|
39
|
+
"ember-auto-import": "^2.4.3",
|
|
36
40
|
"ember-cli": "~<%= emberCLIVersion %>",
|
|
37
41
|
"ember-cli-app-version": "^5.0.0",
|
|
38
42
|
"ember-cli-babel": "^7.26.11",
|
|
39
43
|
"ember-cli-dependency-checker": "^3.3.1",
|
|
40
|
-
"ember-cli-htmlbars": "^6.1.
|
|
44
|
+
"ember-cli-htmlbars": "^6.1.1",
|
|
41
45
|
"ember-cli-inject-live-reload": "^2.1.0",
|
|
42
46
|
"ember-cli-sri": "^2.1.1",
|
|
43
47
|
"ember-cli-terser": "^4.0.2",
|
|
@@ -45,21 +49,20 @@
|
|
|
45
49
|
"ember-fetch": "^8.1.2",
|
|
46
50
|
"ember-load-initializers": "^2.1.2",
|
|
47
51
|
"ember-page-title": "^7.0.0",
|
|
48
|
-
"ember-qunit": "^
|
|
52
|
+
"ember-qunit": "^6.0.0",
|
|
49
53
|
"ember-resolver": "^8.0.3",
|
|
50
|
-
"ember-source": "~4.
|
|
51
|
-
"ember-template-lint": "^4.
|
|
54
|
+
"ember-source": "~4.9.0-beta.1",
|
|
55
|
+
"ember-template-lint": "^4.16.1<% if (welcome) { %>",
|
|
52
56
|
"ember-welcome-page": "^6.2.0<% } %>",
|
|
53
57
|
"eslint": "^7.32.0",
|
|
54
58
|
"eslint-config-prettier": "^8.5.0",
|
|
55
|
-
"eslint-plugin-ember": "^11.0
|
|
59
|
+
"eslint-plugin-ember": "^11.1.0",
|
|
56
60
|
"eslint-plugin-node": "^11.1.0",
|
|
57
61
|
"eslint-plugin-prettier": "^4.2.1",
|
|
58
62
|
"eslint-plugin-qunit": "^7.3.1",
|
|
59
63
|
"loader.js": "^4.7.0",
|
|
60
|
-
"npm-run-all": "^4.1.5",
|
|
61
64
|
"prettier": "^2.7.1",
|
|
62
|
-
"qunit": "^2.19.
|
|
65
|
+
"qunit": "^2.19.2",
|
|
63
66
|
"qunit-dom": "^2.0.0",
|
|
64
67
|
"webpack": "^5.74.0"
|
|
65
68
|
},
|
|
@@ -2,13 +2,14 @@ import {
|
|
|
2
2
|
setupApplicationTest as upstreamSetupApplicationTest,
|
|
3
3
|
setupRenderingTest as upstreamSetupRenderingTest,
|
|
4
4
|
setupTest as upstreamSetupTest,
|
|
5
|
+
SetupTestOptions,
|
|
5
6
|
} from 'ember-qunit';
|
|
6
7
|
|
|
7
8
|
// This file exists to provide wrappers around ember-qunit's / ember-mocha's
|
|
8
9
|
// test setup functions. This way, you can easily extend the setup that is
|
|
9
10
|
// needed per test type.
|
|
10
11
|
|
|
11
|
-
function setupApplicationTest(hooks, options) {
|
|
12
|
+
function setupApplicationTest(hooks: NestedHooks, options?: SetupTestOptions) {
|
|
12
13
|
upstreamSetupApplicationTest(hooks, options);
|
|
13
14
|
|
|
14
15
|
// Additional setup for application tests can be done here.
|
|
@@ -27,13 +28,13 @@ function setupApplicationTest(hooks, options) {
|
|
|
27
28
|
// setupMirage(hooks); // ember-cli-mirage
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
function setupRenderingTest(hooks, options) {
|
|
31
|
+
function setupRenderingTest(hooks: NestedHooks, options?: SetupTestOptions) {
|
|
31
32
|
upstreamSetupRenderingTest(hooks, options);
|
|
32
33
|
|
|
33
34
|
// Additional setup for rendering tests can be done here.
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
function setupTest(hooks, options) {
|
|
37
|
+
function setupTest(hooks: NestedHooks, options?: SetupTestOptions) {
|
|
37
38
|
upstreamSetupTest(hooks, options);
|
|
38
39
|
|
|
39
40
|
// Additional setup for unit tests can be done here.
|
|
File without changes
|
package/blueprints/app/index.js
CHANGED
|
@@ -8,6 +8,8 @@ const directoryForPackageName = require('../../lib/utilities/directory-for-packa
|
|
|
8
8
|
module.exports = {
|
|
9
9
|
description: 'The default blueprint for ember-cli projects.',
|
|
10
10
|
|
|
11
|
+
shouldTransformTypeScript: true,
|
|
12
|
+
|
|
11
13
|
filesToRemove: [
|
|
12
14
|
'app/styles/.gitkeep',
|
|
13
15
|
'app/templates/.gitkeep',
|
|
@@ -37,6 +39,7 @@ module.exports = {
|
|
|
37
39
|
options.yarn && '"--yarn"',
|
|
38
40
|
embroider && '"--embroider"',
|
|
39
41
|
options.ciProvider && `"--ci-provider=${options.ciProvider}"`,
|
|
42
|
+
options.typescript && `"--typescript"`,
|
|
40
43
|
]
|
|
41
44
|
.filter(Boolean)
|
|
42
45
|
.join(',\n ') +
|
|
@@ -56,6 +59,7 @@ module.exports = {
|
|
|
56
59
|
embroider,
|
|
57
60
|
lang: options.lang,
|
|
58
61
|
ciProvider: options.ciProvider,
|
|
62
|
+
typescript: options.typescript,
|
|
59
63
|
};
|
|
60
64
|
},
|
|
61
65
|
|
|
@@ -82,4 +86,10 @@ module.exports = {
|
|
|
82
86
|
this.ui.writeLine('');
|
|
83
87
|
this.ui.writeLine(prependEmoji('✨', `Creating a new Ember app in ${chalk.yellow(process.cwd())}:`));
|
|
84
88
|
},
|
|
89
|
+
|
|
90
|
+
async afterInstall(options) {
|
|
91
|
+
if (options.typescript) {
|
|
92
|
+
await this.addAddonToProject({ name: 'ember-cli-typescript', blueprintOptions: options });
|
|
93
|
+
}
|
|
94
|
+
},
|
|
85
95
|
};
|