ember-cli 5.4.0 → 5.5.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 +17 -0
- package/blueprints/addon/files/.travis.yml +11 -0
- package/blueprints/addon/files/CONTRIBUTING.md +6 -6
- package/blueprints/addon/index.js +12 -0
- package/blueprints/app/files/.travis.yml +11 -0
- package/blueprints/app/files/README.md +7 -7
- package/blueprints/app/files/ember-cli-build.js +6 -0
- package/blueprints/app/files/package.json +2 -2
- package/blueprints/app/index.js +16 -0
- package/docs/build/data.json +77 -51
- package/lib/commands/addon.js +1 -1
- package/lib/commands/init.js +21 -1
- package/lib/commands/new.js +1 -1
- package/lib/debug/deprecate.js +12 -3
- package/lib/models/blueprint.js +59 -9
- package/lib/models/command.js +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# ember-cli Changelog
|
|
2
2
|
|
|
3
|
+
## v5.5.0-beta.0
|
|
4
|
+
|
|
5
|
+
#### Blueprint Changes
|
|
6
|
+
|
|
7
|
+
- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v5.4.0...v5.5.0-beta.0)
|
|
8
|
+
- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v5.4.0...v5.5.0-beta.0)
|
|
9
|
+
|
|
10
|
+
#### Changelog
|
|
11
|
+
|
|
12
|
+
- [#10332](https://github.com/ember-cli/ember-cli/pull/10332) [ENHANCEMENT] Support converting gts files in blueprint [@IgnaceMaes](https://github.com/IgnaceMaes)
|
|
13
|
+
- [#10350](https://github.com/ember-cli/ember-cli/pull/10350) [ENHANCEMENT] Deprecate Travis CI support [@bertdeblock](https://github.com/bertdeblock)
|
|
14
|
+
- [#10370](https://github.com/ember-cli/ember-cli/pull/10370) When generating a new app with --embroider use all optimisation flags [@mansona](https://github.com/mansona)
|
|
15
|
+
- [#10393](https://github.com/ember-cli/ember-cli/pull/10393) [ENHANCEMENT] feat: add skip-install alias to skip-npm [@IgnaceMaes](https://github.com/IgnaceMaes)
|
|
16
|
+
- [#9514](https://github.com/ember-cli/ember-cli/pull/9514) [ENHANCEMENT] Use packager commands in `CONTRIBUTING.md` and `README.md` files in `app` and `addon` blueprints [@elwayman02](https://github.com/elwayman02)
|
|
17
|
+
|
|
18
|
+
Thank you to all who took the time to contribute!
|
|
19
|
+
|
|
3
20
|
## v5.4.0
|
|
4
21
|
|
|
5
22
|
#### Blueprint Changes
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
# DEPRECATION:
|
|
2
|
+
#
|
|
3
|
+
# Support for generating a Travis CI config file is deprecated.
|
|
4
|
+
# You can keep using Travis CI, or you could also consider switching to GitHub Actions instead.
|
|
5
|
+
#
|
|
6
|
+
# Feel free to remove this comment block if you want to continue using Travis CI.
|
|
7
|
+
#
|
|
8
|
+
# ID travis-ci-support
|
|
9
|
+
# UNTIL 6.0.0
|
|
10
|
+
# URL https://deprecations.emberjs.com/id/travis-ci-support
|
|
11
|
+
|
|
1
12
|
---
|
|
2
13
|
language: node_js
|
|
3
14
|
node_js:
|
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
|
|
9
9
|
## Linting
|
|
10
10
|
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* `<%= invokeScriptPrefix %> lint`
|
|
12
|
+
* `<%= invokeScriptPrefix %> lint:fix`
|
|
13
13
|
|
|
14
14
|
## Running tests
|
|
15
15
|
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
16
|
+
* `<%= invokeScriptPrefix %> test` – Runs the test suite on the current Ember version
|
|
17
|
+
* `<%= invokeScriptPrefix %> test:ember <% if (npm) { %>-- <% } %>--server` – Runs the test suite in "watch mode"
|
|
18
|
+
* `<%= invokeScriptPrefix %> test:ember-compatibility` – Runs the test suite against multiple Ember versions
|
|
19
19
|
|
|
20
20
|
## Running the dummy application
|
|
21
21
|
|
|
22
|
-
*
|
|
22
|
+
* `<%= invokeScriptPrefix %> start`
|
|
23
23
|
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).
|
|
24
24
|
|
|
25
25
|
For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/).
|
|
@@ -171,6 +171,16 @@ module.exports = {
|
|
|
171
171
|
outdent;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
+
let invokeScriptPrefix = 'npm run';
|
|
175
|
+
|
|
176
|
+
if (options.packageManager === 'yarn') {
|
|
177
|
+
invokeScriptPrefix = 'yarn';
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
if (options.packageManager === 'pnpm') {
|
|
181
|
+
invokeScriptPrefix = 'pnpm';
|
|
182
|
+
}
|
|
183
|
+
|
|
174
184
|
return {
|
|
175
185
|
addonDirectory: directoryForPackageName(addonName),
|
|
176
186
|
name,
|
|
@@ -182,6 +192,8 @@ module.exports = {
|
|
|
182
192
|
year: date.getFullYear(),
|
|
183
193
|
yarn: options.packageManager === 'yarn',
|
|
184
194
|
pnpm: options.packageManager === 'pnpm',
|
|
195
|
+
npm: options.packageManager !== 'yarn' && options.packageManager !== 'pnpm',
|
|
196
|
+
invokeScriptPrefix,
|
|
185
197
|
welcome: options.welcome,
|
|
186
198
|
blueprint: 'addon',
|
|
187
199
|
blueprintOptions,
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
# DEPRECATION:
|
|
2
|
+
#
|
|
3
|
+
# Support for generating a Travis CI config file is deprecated.
|
|
4
|
+
# You can keep using Travis CI, or you could also consider switching to GitHub Actions instead.
|
|
5
|
+
#
|
|
6
|
+
# Feel free to remove this comment block if you want to continue using Travis CI.
|
|
7
|
+
#
|
|
8
|
+
# ID travis-ci-support
|
|
9
|
+
# UNTIL 6.0.0
|
|
10
|
+
# URL https://deprecations.emberjs.com/id/travis-ci-support
|
|
11
|
+
|
|
1
12
|
---
|
|
2
13
|
language: node_js
|
|
3
14
|
node_js:
|
|
@@ -22,7 +22,7 @@ You will need the following things properly installed on your computer.
|
|
|
22
22
|
|
|
23
23
|
## Running / Development
|
|
24
24
|
|
|
25
|
-
*
|
|
25
|
+
* `<%= invokeScriptPrefix %> start`
|
|
26
26
|
* Visit your app at [http://localhost:4200](http://localhost:4200).
|
|
27
27
|
* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).
|
|
28
28
|
|
|
@@ -32,18 +32,18 @@ Make use of the many generators for code, try `ember help generate` for more det
|
|
|
32
32
|
|
|
33
33
|
### Running Tests
|
|
34
34
|
|
|
35
|
-
*
|
|
36
|
-
*
|
|
35
|
+
* `<%= invokeScriptPrefix %> test`
|
|
36
|
+
* `<%= invokeScriptPrefix %> test:ember <% if (npm) { %>-- <% } %>--server`
|
|
37
37
|
|
|
38
38
|
### Linting
|
|
39
39
|
|
|
40
|
-
*
|
|
41
|
-
*
|
|
40
|
+
* `<%= invokeScriptPrefix %> lint`
|
|
41
|
+
* `<%= invokeScriptPrefix %> lint:fix`
|
|
42
42
|
|
|
43
43
|
### Building
|
|
44
44
|
|
|
45
|
-
*
|
|
46
|
-
*
|
|
45
|
+
* `<%= execBinPrefix %> ember build` (development)
|
|
46
|
+
* `<%= invokeScriptPrefix %> build` (production)
|
|
47
47
|
|
|
48
48
|
### Deploying
|
|
49
49
|
|
|
@@ -11,6 +11,12 @@ module.exports = function (defaults) {
|
|
|
11
11
|
|
|
12
12
|
<% if (embroider) { %>const { Webpack } = require('@embroider/webpack');
|
|
13
13
|
return require('@embroider/compat').compatBuild(app, Webpack, {
|
|
14
|
+
staticAddonTestSupportTrees: true,
|
|
15
|
+
staticAddonTrees: true,
|
|
16
|
+
staticHelpers: true,
|
|
17
|
+
staticModifiers: true,
|
|
18
|
+
staticComponents: true,
|
|
19
|
+
staticEmberSource: true,
|
|
14
20
|
skipBabel: [
|
|
15
21
|
{
|
|
16
22
|
package: 'qunit',
|
|
@@ -82,14 +82,14 @@
|
|
|
82
82
|
"ember-cli-inject-live-reload": "^2.1.0<% if (!embroider) { %>",
|
|
83
83
|
"ember-cli-sri": "^2.1.1",
|
|
84
84
|
"ember-cli-terser": "^4.0.2<% } %>",
|
|
85
|
-
"ember-data": "~5.
|
|
85
|
+
"ember-data": "~5.4.0-beta.1",
|
|
86
86
|
"ember-fetch": "^8.1.2",
|
|
87
87
|
"ember-load-initializers": "^2.1.2",
|
|
88
88
|
"ember-modifier": "^4.1.0",
|
|
89
89
|
"ember-page-title": "^8.0.0",
|
|
90
90
|
"ember-qunit": "^8.0.1",
|
|
91
91
|
"ember-resolver": "^11.0.1",
|
|
92
|
-
"ember-source": "~5.
|
|
92
|
+
"ember-source": "~5.5.0-beta.1",
|
|
93
93
|
"ember-template-lint": "^5.11.2<% if (welcome) { %>",
|
|
94
94
|
"ember-welcome-page": "^7.0.2<% } %>",
|
|
95
95
|
"eslint": "^8.52.0",
|
package/blueprints/app/index.js
CHANGED
|
@@ -47,6 +47,19 @@ module.exports = {
|
|
|
47
47
|
outdent;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
let invokeScriptPrefix = 'npm run';
|
|
51
|
+
let execBinPrefix = 'npm exec';
|
|
52
|
+
|
|
53
|
+
if (options.packageManager === 'yarn') {
|
|
54
|
+
invokeScriptPrefix = 'yarn';
|
|
55
|
+
execBinPrefix = 'yarn';
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (options.packageManager === 'pnpm') {
|
|
59
|
+
invokeScriptPrefix = 'pnpm';
|
|
60
|
+
execBinPrefix = 'pnpm';
|
|
61
|
+
}
|
|
62
|
+
|
|
50
63
|
return {
|
|
51
64
|
appDirectory: directoryForPackageName(name),
|
|
52
65
|
name,
|
|
@@ -55,6 +68,9 @@ module.exports = {
|
|
|
55
68
|
emberCLIVersion: require('../../package').version,
|
|
56
69
|
yarn: options.packageManager === 'yarn',
|
|
57
70
|
pnpm: options.packageManager === 'pnpm',
|
|
71
|
+
npm: options.packageManager !== 'yarn' && options.packageManager !== 'pnpm',
|
|
72
|
+
invokeScriptPrefix,
|
|
73
|
+
execBinPrefix,
|
|
58
74
|
welcome: options.welcome,
|
|
59
75
|
blueprint: 'app',
|
|
60
76
|
blueprintOptions,
|
package/docs/build/data.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"logo": "https://ember-cli.com/assets/images/ember-cli-logo-small-dark.png",
|
|
4
4
|
"name": "ember-cli",
|
|
5
5
|
"description": "Command line tool for developing ambitious ember.js apps",
|
|
6
|
-
"version": "5.
|
|
6
|
+
"version": "5.5.0-beta.0-beta-1012f7af20"
|
|
7
7
|
},
|
|
8
8
|
"files": {
|
|
9
9
|
"lib/broccoli/default-packager.js": {
|
|
@@ -3911,7 +3911,33 @@
|
|
|
3911
3911
|
},
|
|
3912
3912
|
{
|
|
3913
3913
|
"file": "lib/models/blueprint.js",
|
|
3914
|
-
"line":
|
|
3914
|
+
"line": 539,
|
|
3915
|
+
"access": "private",
|
|
3916
|
+
"tagname": "",
|
|
3917
|
+
"itemtype": "method",
|
|
3918
|
+
"name": "removeTypes",
|
|
3919
|
+
"params": [
|
|
3920
|
+
{
|
|
3921
|
+
"name": "extension",
|
|
3922
|
+
"description": "",
|
|
3923
|
+
"type": "String"
|
|
3924
|
+
},
|
|
3925
|
+
{
|
|
3926
|
+
"name": "code",
|
|
3927
|
+
"description": "",
|
|
3928
|
+
"type": "String"
|
|
3929
|
+
}
|
|
3930
|
+
],
|
|
3931
|
+
"return": {
|
|
3932
|
+
"description": "",
|
|
3933
|
+
"type": "Promise"
|
|
3934
|
+
},
|
|
3935
|
+
"class": "Blueprint",
|
|
3936
|
+
"module": "ember-cli"
|
|
3937
|
+
},
|
|
3938
|
+
{
|
|
3939
|
+
"file": "lib/models/blueprint.js",
|
|
3940
|
+
"line": 582,
|
|
3915
3941
|
"itemtype": "method",
|
|
3916
3942
|
"name": "install",
|
|
3917
3943
|
"params": [
|
|
@@ -3930,7 +3956,7 @@
|
|
|
3930
3956
|
},
|
|
3931
3957
|
{
|
|
3932
3958
|
"file": "lib/models/blueprint.js",
|
|
3933
|
-
"line":
|
|
3959
|
+
"line": 609,
|
|
3934
3960
|
"itemtype": "method",
|
|
3935
3961
|
"name": "uninstall",
|
|
3936
3962
|
"params": [
|
|
@@ -3949,7 +3975,7 @@
|
|
|
3949
3975
|
},
|
|
3950
3976
|
{
|
|
3951
3977
|
"file": "lib/models/blueprint.js",
|
|
3952
|
-
"line":
|
|
3978
|
+
"line": 631,
|
|
3953
3979
|
"description": "Hook for running operations before install.",
|
|
3954
3980
|
"itemtype": "method",
|
|
3955
3981
|
"name": "beforeInstall",
|
|
@@ -3962,7 +3988,7 @@
|
|
|
3962
3988
|
},
|
|
3963
3989
|
{
|
|
3964
3990
|
"file": "lib/models/blueprint.js",
|
|
3965
|
-
"line":
|
|
3991
|
+
"line": 638,
|
|
3966
3992
|
"description": "Hook for running operations after install.",
|
|
3967
3993
|
"itemtype": "method",
|
|
3968
3994
|
"name": "afterInstall",
|
|
@@ -3975,7 +4001,7 @@
|
|
|
3975
4001
|
},
|
|
3976
4002
|
{
|
|
3977
4003
|
"file": "lib/models/blueprint.js",
|
|
3978
|
-
"line":
|
|
4004
|
+
"line": 645,
|
|
3979
4005
|
"description": "Hook for running operations before uninstall.",
|
|
3980
4006
|
"itemtype": "method",
|
|
3981
4007
|
"name": "beforeUninstall",
|
|
@@ -3988,7 +4014,7 @@
|
|
|
3988
4014
|
},
|
|
3989
4015
|
{
|
|
3990
4016
|
"file": "lib/models/blueprint.js",
|
|
3991
|
-
"line":
|
|
4017
|
+
"line": 652,
|
|
3992
4018
|
"description": "Hook for running operations after uninstall.",
|
|
3993
4019
|
"itemtype": "method",
|
|
3994
4020
|
"name": "afterUninstall",
|
|
@@ -4001,7 +4027,7 @@
|
|
|
4001
4027
|
},
|
|
4002
4028
|
{
|
|
4003
4029
|
"file": "lib/models/blueprint.js",
|
|
4004
|
-
"line":
|
|
4030
|
+
"line": 661,
|
|
4005
4031
|
"description": "Hook for adding custom template variables.\n\nWhen the following is called on the command line:\n\n```sh\nember generate controller foo --type=array --dry-run isAdmin:true\n```\n\nThe object passed to `locals` looks like this:\n\n```js\n{\n entity: {\n name: 'foo',\n options: {\n isAdmin: true\n }\n },\n dryRun: true\n type: \"array\"\n // more keys\n}\n```\n\nThis hook must return an object or a Promise which resolves to an object.\nThe resolved object will be merged with the aforementioned default locals.",
|
|
4006
4032
|
"access": "public",
|
|
4007
4033
|
"tagname": "",
|
|
@@ -4023,7 +4049,7 @@
|
|
|
4023
4049
|
},
|
|
4024
4050
|
{
|
|
4025
4051
|
"file": "lib/models/blueprint.js",
|
|
4026
|
-
"line":
|
|
4052
|
+
"line": 696,
|
|
4027
4053
|
"description": "Hook to add additional or override existing fileMap tokens.\n\nUse `fileMapTokens` to add custom fileMap tokens for use\nin the `mapFile` method. The hook must return an object in the\nfollowing pattern:\n\n```js\n{\n __token__(options){\n // logic to determine value goes here\n return 'value';\n }\n}\n```\n\nIt will be merged with the default `fileMapTokens`, and can be used\nto override any of the default tokens.\n\nTokens are used in the files folder (see `files`), and get replaced with\nvalues when the `mapFile` method is called.",
|
|
4028
4054
|
"access": "public",
|
|
4029
4055
|
"tagname": "",
|
|
@@ -4038,7 +4064,7 @@
|
|
|
4038
4064
|
},
|
|
4039
4065
|
{
|
|
4040
4066
|
"file": "lib/models/blueprint.js",
|
|
4041
|
-
"line":
|
|
4067
|
+
"line": 724,
|
|
4042
4068
|
"access": "private",
|
|
4043
4069
|
"tagname": "",
|
|
4044
4070
|
"itemtype": "method",
|
|
@@ -4059,7 +4085,7 @@
|
|
|
4059
4085
|
},
|
|
4060
4086
|
{
|
|
4061
4087
|
"file": "lib/models/blueprint.js",
|
|
4062
|
-
"line":
|
|
4088
|
+
"line": 780,
|
|
4063
4089
|
"description": "Used to generate fileMap tokens for mapFile.",
|
|
4064
4090
|
"itemtype": "method",
|
|
4065
4091
|
"name": "generateFileMap",
|
|
@@ -4079,7 +4105,7 @@
|
|
|
4079
4105
|
},
|
|
4080
4106
|
{
|
|
4081
4107
|
"file": "lib/models/blueprint.js",
|
|
4082
|
-
"line":
|
|
4108
|
+
"line": 795,
|
|
4083
4109
|
"itemtype": "method",
|
|
4084
4110
|
"name": "buildFileInfo",
|
|
4085
4111
|
"params": [
|
|
@@ -4108,7 +4134,7 @@
|
|
|
4108
4134
|
},
|
|
4109
4135
|
{
|
|
4110
4136
|
"file": "lib/models/blueprint.js",
|
|
4111
|
-
"line":
|
|
4137
|
+
"line": 816,
|
|
4112
4138
|
"itemtype": "method",
|
|
4113
4139
|
"name": "isUpdate",
|
|
4114
4140
|
"return": {
|
|
@@ -4120,7 +4146,7 @@
|
|
|
4120
4146
|
},
|
|
4121
4147
|
{
|
|
4122
4148
|
"file": "lib/models/blueprint.js",
|
|
4123
|
-
"line":
|
|
4149
|
+
"line": 826,
|
|
4124
4150
|
"access": "private",
|
|
4125
4151
|
"tagname": "",
|
|
4126
4152
|
"itemtype": "method",
|
|
@@ -4151,7 +4177,7 @@
|
|
|
4151
4177
|
},
|
|
4152
4178
|
{
|
|
4153
4179
|
"file": "lib/models/blueprint.js",
|
|
4154
|
-
"line":
|
|
4180
|
+
"line": 838,
|
|
4155
4181
|
"description": "Add update files to ignored files or reset them",
|
|
4156
4182
|
"access": "private",
|
|
4157
4183
|
"tagname": "",
|
|
@@ -4162,7 +4188,7 @@
|
|
|
4162
4188
|
},
|
|
4163
4189
|
{
|
|
4164
4190
|
"file": "lib/models/blueprint.js",
|
|
4165
|
-
"line":
|
|
4191
|
+
"line": 851,
|
|
4166
4192
|
"access": "private",
|
|
4167
4193
|
"tagname": "",
|
|
4168
4194
|
"itemtype": "method",
|
|
@@ -4183,7 +4209,7 @@
|
|
|
4183
4209
|
},
|
|
4184
4210
|
{
|
|
4185
4211
|
"file": "lib/models/blueprint.js",
|
|
4186
|
-
"line":
|
|
4212
|
+
"line": 864,
|
|
4187
4213
|
"access": "private",
|
|
4188
4214
|
"tagname": "",
|
|
4189
4215
|
"itemtype": "method",
|
|
@@ -4205,7 +4231,7 @@
|
|
|
4205
4231
|
},
|
|
4206
4232
|
{
|
|
4207
4233
|
"file": "lib/models/blueprint.js",
|
|
4208
|
-
"line":
|
|
4234
|
+
"line": 878,
|
|
4209
4235
|
"itemtype": "method",
|
|
4210
4236
|
"name": "processFiles",
|
|
4211
4237
|
"params": [
|
|
@@ -4229,7 +4255,7 @@
|
|
|
4229
4255
|
},
|
|
4230
4256
|
{
|
|
4231
4257
|
"file": "lib/models/blueprint.js",
|
|
4232
|
-
"line":
|
|
4258
|
+
"line": 911,
|
|
4233
4259
|
"itemtype": "method",
|
|
4234
4260
|
"name": "processFilesForUninstall",
|
|
4235
4261
|
"params": [
|
|
@@ -4249,7 +4275,7 @@
|
|
|
4249
4275
|
},
|
|
4250
4276
|
{
|
|
4251
4277
|
"file": "lib/models/blueprint.js",
|
|
4252
|
-
"line":
|
|
4278
|
+
"line": 962,
|
|
4253
4279
|
"itemtype": "method",
|
|
4254
4280
|
"name": "mapFile",
|
|
4255
4281
|
"params": [
|
|
@@ -4272,7 +4298,7 @@
|
|
|
4272
4298
|
},
|
|
4273
4299
|
{
|
|
4274
4300
|
"file": "lib/models/blueprint.js",
|
|
4275
|
-
"line":
|
|
4301
|
+
"line": 979,
|
|
4276
4302
|
"description": "Looks for a __root__ token in the files folder. Must be present for\nthe blueprint to support addon tokens. The `server`, `blueprints`, and `test`",
|
|
4277
4303
|
"access": "private",
|
|
4278
4304
|
"tagname": "",
|
|
@@ -4287,7 +4313,7 @@
|
|
|
4287
4313
|
},
|
|
4288
4314
|
{
|
|
4289
4315
|
"file": "lib/models/blueprint.js",
|
|
4290
|
-
"line":
|
|
4316
|
+
"line": 991,
|
|
4291
4317
|
"access": "private",
|
|
4292
4318
|
"tagname": "",
|
|
4293
4319
|
"itemtype": "method",
|
|
@@ -4317,7 +4343,7 @@
|
|
|
4317
4343
|
},
|
|
4318
4344
|
{
|
|
4319
4345
|
"file": "lib/models/blueprint.js",
|
|
4320
|
-
"line":
|
|
4346
|
+
"line": 1021,
|
|
4321
4347
|
"access": "private",
|
|
4322
4348
|
"tagname": "",
|
|
4323
4349
|
"itemtype": "method",
|
|
@@ -4338,7 +4364,7 @@
|
|
|
4338
4364
|
},
|
|
4339
4365
|
{
|
|
4340
4366
|
"file": "lib/models/blueprint.js",
|
|
4341
|
-
"line":
|
|
4367
|
+
"line": 1054,
|
|
4342
4368
|
"description": "Used to add a package to the project's `package.json`.\n\nGenerally, this would be done from the `afterInstall` hook, to\nensure that a package that is required by a given blueprint is\navailable.",
|
|
4343
4369
|
"itemtype": "method",
|
|
4344
4370
|
"name": "addPackageToProject",
|
|
@@ -4363,7 +4389,7 @@
|
|
|
4363
4389
|
},
|
|
4364
4390
|
{
|
|
4365
4391
|
"file": "lib/models/blueprint.js",
|
|
4366
|
-
"line":
|
|
4392
|
+
"line": 1076,
|
|
4367
4393
|
"description": "Used to add multiple packages to the project's `package.json`.\n\nGenerally, this would be done from the `afterInstall` hook, to\nensure that a package that is required by a given blueprint is\navailable.\n\nExpects each array item to be an object with a `name`. Each object\nmay optionally have a `target` to specify a specific version.",
|
|
4368
4394
|
"itemtype": "method",
|
|
4369
4395
|
"name": "addPackagesToProject",
|
|
@@ -4386,7 +4412,7 @@
|
|
|
4386
4412
|
},
|
|
4387
4413
|
{
|
|
4388
4414
|
"file": "lib/models/blueprint.js",
|
|
4389
|
-
"line":
|
|
4415
|
+
"line": 1125,
|
|
4390
4416
|
"description": "Used to remove a package from the project's `package.json`.\n\nGenerally, this would be done from the `afterInstall` hook, to\nensure that any package conflicts can be resolved before the\naddon is used.",
|
|
4391
4417
|
"itemtype": "method",
|
|
4392
4418
|
"name": "removePackageFromProject",
|
|
@@ -4406,7 +4432,7 @@
|
|
|
4406
4432
|
},
|
|
4407
4433
|
{
|
|
4408
4434
|
"file": "lib/models/blueprint.js",
|
|
4409
|
-
"line":
|
|
4435
|
+
"line": 1142,
|
|
4410
4436
|
"description": "Used to remove multiple packages from the project's `package.json`.\n\nGenerally, this would be done from the `afterInstall` hook, to\nensure that any package conflicts can be resolved before the\naddon is used.\n\nExpects each array item to be an object with a `name` property.",
|
|
4411
4437
|
"itemtype": "method",
|
|
4412
4438
|
"name": "removePackagesFromProject",
|
|
@@ -4426,7 +4452,7 @@
|
|
|
4426
4452
|
},
|
|
4427
4453
|
{
|
|
4428
4454
|
"file": "lib/models/blueprint.js",
|
|
4429
|
-
"line":
|
|
4455
|
+
"line": 1183,
|
|
4430
4456
|
"description": "Used to add an addon to the project's `package.json` and run it's\n`defaultBlueprint` if it provides one.\n\nGenerally, this would be done from the `afterInstall` hook, to\nensure that a package that is required by a given blueprint is\navailable.",
|
|
4431
4457
|
"itemtype": "method",
|
|
4432
4458
|
"name": "addAddonToProject",
|
|
@@ -4446,7 +4472,7 @@
|
|
|
4446
4472
|
},
|
|
4447
4473
|
{
|
|
4448
4474
|
"file": "lib/models/blueprint.js",
|
|
4449
|
-
"line":
|
|
4475
|
+
"line": 1203,
|
|
4450
4476
|
"description": "Used to add multiple addons to the project's `package.json` and run their\n`defaultBlueprint` if they provide one.\n\nGenerally, this would be done from the `afterInstall` hook, to\nensure that a package that is required by a given blueprint is\navailable.",
|
|
4451
4477
|
"itemtype": "method",
|
|
4452
4478
|
"name": "addAddonsToProject",
|
|
@@ -4466,7 +4492,7 @@
|
|
|
4466
4492
|
},
|
|
4467
4493
|
{
|
|
4468
4494
|
"file": "lib/models/blueprint.js",
|
|
4469
|
-
"line":
|
|
4495
|
+
"line": 1280,
|
|
4470
4496
|
"description": "Used to retrieve a task with the given name. Passes the new task\nthe standard information available (like `ui`, `project`, etc).",
|
|
4471
4497
|
"itemtype": "method",
|
|
4472
4498
|
"name": "taskFor",
|
|
@@ -4483,7 +4509,7 @@
|
|
|
4483
4509
|
},
|
|
4484
4510
|
{
|
|
4485
4511
|
"file": "lib/models/blueprint.js",
|
|
4486
|
-
"line":
|
|
4512
|
+
"line": 1297,
|
|
4487
4513
|
"description": "Inserts the given content into a file. If the `contentsToInsert` string is already\npresent in the current contents, the file will not be changed unless `force` option\nis passed.\n\nIf `options.before` is specified, `contentsToInsert` will be inserted before\nthe first instance of that string. If `options.after` is specified, the\ncontents will be inserted after the first instance of that string.\nIf the string specified by options.before or options.after is not in the file,\nno change will be made.\n\nIf neither `options.before` nor `options.after` are present, `contentsToInsert`\nwill be inserted at the end of the file.\n\nExample:\n```\n// app/router.js\nRouter.map(function () {\n});\n```\n\n```\ninsertIntoFile('app/router.js', ' this.route(\"admin\");', {\n after: 'Router.map(function () {' + EOL\n}).then(function() {\n // file has been inserted into!\n});\n\n\n```\n\n```\n// app/router.js\nRouter.map(function () {\n this.route(\"admin\");\n});\n```",
|
|
4488
4514
|
"itemtype": "method",
|
|
4489
4515
|
"name": "insertIntoFile",
|
|
@@ -4513,7 +4539,7 @@
|
|
|
4513
4539
|
},
|
|
4514
4540
|
{
|
|
4515
4541
|
"file": "lib/models/blueprint.js",
|
|
4516
|
-
"line":
|
|
4542
|
+
"line": 1401,
|
|
4517
4543
|
"description": "Used to retrieve a blueprint with the given name.",
|
|
4518
4544
|
"itemtype": "method",
|
|
4519
4545
|
"name": "lookupBlueprint",
|
|
@@ -4535,7 +4561,7 @@
|
|
|
4535
4561
|
},
|
|
4536
4562
|
{
|
|
4537
4563
|
"file": "lib/models/blueprint.js",
|
|
4538
|
-
"line":
|
|
4564
|
+
"line": 1418,
|
|
4539
4565
|
"static": 1,
|
|
4540
4566
|
"itemtype": "method",
|
|
4541
4567
|
"name": "lookup",
|
|
@@ -4582,7 +4608,7 @@
|
|
|
4582
4608
|
},
|
|
4583
4609
|
{
|
|
4584
4610
|
"file": "lib/models/blueprint.js",
|
|
4585
|
-
"line":
|
|
4611
|
+
"line": 1459,
|
|
4586
4612
|
"description": "Loads a blueprint from given path.",
|
|
4587
4613
|
"static": 1,
|
|
4588
4614
|
"itemtype": "method",
|
|
@@ -4610,7 +4636,7 @@
|
|
|
4610
4636
|
},
|
|
4611
4637
|
{
|
|
4612
4638
|
"file": "lib/models/blueprint.js",
|
|
4613
|
-
"line":
|
|
4639
|
+
"line": 1487,
|
|
4614
4640
|
"static": 1,
|
|
4615
4641
|
"itemtype": "method",
|
|
4616
4642
|
"name": "list",
|
|
@@ -4640,7 +4666,7 @@
|
|
|
4640
4666
|
},
|
|
4641
4667
|
{
|
|
4642
4668
|
"file": "lib/models/blueprint.js",
|
|
4643
|
-
"line":
|
|
4669
|
+
"line": 1536,
|
|
4644
4670
|
"description": "Files that are renamed when installed into the target directory.\nThis allows including files in the blueprint that would have an effect\non another process, such as a file named `.gitignore`.\n\nThe keys are the filenames used in the files folder.\nThe values are the filenames used in the target directory.",
|
|
4645
4671
|
"static": 1,
|
|
4646
4672
|
"itemtype": "property",
|
|
@@ -4651,7 +4677,7 @@
|
|
|
4651
4677
|
},
|
|
4652
4678
|
{
|
|
4653
4679
|
"file": "lib/models/blueprint.js",
|
|
4654
|
-
"line":
|
|
4680
|
+
"line": 1551,
|
|
4655
4681
|
"static": 1,
|
|
4656
4682
|
"itemtype": "property",
|
|
4657
4683
|
"name": "ignoredFiles",
|
|
@@ -4661,7 +4687,7 @@
|
|
|
4661
4687
|
},
|
|
4662
4688
|
{
|
|
4663
4689
|
"file": "lib/models/blueprint.js",
|
|
4664
|
-
"line":
|
|
4690
|
+
"line": 1557,
|
|
4665
4691
|
"static": 1,
|
|
4666
4692
|
"itemtype": "property",
|
|
4667
4693
|
"name": "ignoredUpdateFiles",
|
|
@@ -4671,7 +4697,7 @@
|
|
|
4671
4697
|
},
|
|
4672
4698
|
{
|
|
4673
4699
|
"file": "lib/models/blueprint.js",
|
|
4674
|
-
"line":
|
|
4700
|
+
"line": 1563,
|
|
4675
4701
|
"static": 1,
|
|
4676
4702
|
"itemtype": "property",
|
|
4677
4703
|
"name": "defaultLookupPaths",
|
|
@@ -4681,7 +4707,7 @@
|
|
|
4681
4707
|
},
|
|
4682
4708
|
{
|
|
4683
4709
|
"file": "lib/models/blueprint.js",
|
|
4684
|
-
"line":
|
|
4710
|
+
"line": 1571,
|
|
4685
4711
|
"access": "private",
|
|
4686
4712
|
"tagname": "",
|
|
4687
4713
|
"itemtype": "method",
|
|
@@ -4703,7 +4729,7 @@
|
|
|
4703
4729
|
},
|
|
4704
4730
|
{
|
|
4705
4731
|
"file": "lib/models/blueprint.js",
|
|
4706
|
-
"line":
|
|
4732
|
+
"line": 1584,
|
|
4707
4733
|
"access": "private",
|
|
4708
4734
|
"tagname": "",
|
|
4709
4735
|
"itemtype": "method",
|
|
@@ -4721,7 +4747,7 @@
|
|
|
4721
4747
|
},
|
|
4722
4748
|
{
|
|
4723
4749
|
"file": "lib/models/blueprint.js",
|
|
4724
|
-
"line":
|
|
4750
|
+
"line": 1595,
|
|
4725
4751
|
"access": "private",
|
|
4726
4752
|
"tagname": "",
|
|
4727
4753
|
"itemtype": "method",
|
|
@@ -4739,7 +4765,7 @@
|
|
|
4739
4765
|
},
|
|
4740
4766
|
{
|
|
4741
4767
|
"file": "lib/models/blueprint.js",
|
|
4742
|
-
"line":
|
|
4768
|
+
"line": 1604,
|
|
4743
4769
|
"access": "private",
|
|
4744
4770
|
"tagname": "",
|
|
4745
4771
|
"itemtype": "method",
|
|
@@ -4766,7 +4792,7 @@
|
|
|
4766
4792
|
},
|
|
4767
4793
|
{
|
|
4768
4794
|
"file": "lib/models/blueprint.js",
|
|
4769
|
-
"line":
|
|
4795
|
+
"line": 1618,
|
|
4770
4796
|
"access": "private",
|
|
4771
4797
|
"tagname": "",
|
|
4772
4798
|
"itemtype": "method",
|
|
@@ -4788,7 +4814,7 @@
|
|
|
4788
4814
|
},
|
|
4789
4815
|
{
|
|
4790
4816
|
"file": "lib/models/blueprint.js",
|
|
4791
|
-
"line":
|
|
4817
|
+
"line": 1630,
|
|
4792
4818
|
"description": "Combines provided lookup paths with defaults and removes\nduplicates.",
|
|
4793
4819
|
"access": "private",
|
|
4794
4820
|
"tagname": "",
|
|
@@ -4811,7 +4837,7 @@
|
|
|
4811
4837
|
},
|
|
4812
4838
|
{
|
|
4813
4839
|
"file": "lib/models/blueprint.js",
|
|
4814
|
-
"line":
|
|
4840
|
+
"line": 1645,
|
|
4815
4841
|
"description": "Looks for a __path__ token in the files folder. Must be present for\nthe blueprint to support pod tokens.",
|
|
4816
4842
|
"access": "private",
|
|
4817
4843
|
"tagname": "",
|
|
@@ -4834,7 +4860,7 @@
|
|
|
4834
4860
|
},
|
|
4835
4861
|
{
|
|
4836
4862
|
"file": "lib/models/blueprint.js",
|
|
4837
|
-
"line":
|
|
4863
|
+
"line": 1684,
|
|
4838
4864
|
"access": "private",
|
|
4839
4865
|
"tagname": "",
|
|
4840
4866
|
"itemtype": "method",
|
|
@@ -4856,7 +4882,7 @@
|
|
|
4856
4882
|
},
|
|
4857
4883
|
{
|
|
4858
4884
|
"file": "lib/models/blueprint.js",
|
|
4859
|
-
"line":
|
|
4885
|
+
"line": 1698,
|
|
4860
4886
|
"access": "private",
|
|
4861
4887
|
"tagname": "",
|
|
4862
4888
|
"itemtype": "method",
|
|
@@ -4878,7 +4904,7 @@
|
|
|
4878
4904
|
},
|
|
4879
4905
|
{
|
|
4880
4906
|
"file": "lib/models/blueprint.js",
|
|
4881
|
-
"line":
|
|
4907
|
+
"line": 1708,
|
|
4882
4908
|
"access": "private",
|
|
4883
4909
|
"tagname": "",
|
|
4884
4910
|
"itemtype": "method",
|
|
@@ -4893,7 +4919,7 @@
|
|
|
4893
4919
|
},
|
|
4894
4920
|
{
|
|
4895
4921
|
"file": "lib/models/blueprint.js",
|
|
4896
|
-
"line":
|
|
4922
|
+
"line": 1721,
|
|
4897
4923
|
"access": "private",
|
|
4898
4924
|
"tagname": "",
|
|
4899
4925
|
"itemtype": "method",
|
|
@@ -5112,7 +5138,7 @@
|
|
|
5112
5138
|
"name": "availableOptions",
|
|
5113
5139
|
"type": "Array",
|
|
5114
5140
|
"example": [
|
|
5115
|
-
"\n```js\navailableOptions: [\n { name: 'dry-run', type: Boolean, default: false, aliases: ['d'] },\n { name: 'verbose', type: Boolean, default: false, aliases: ['v'] },\n { name: 'blueprint', type: String, default: 'app', aliases: ['b'] },\n { name: 'skip-npm', type: Boolean, default: false, aliases: ['sn'] },\n { name: 'skip-git', type: Boolean, default: false, aliases: ['sg'] },\n { name: 'directory', type: String , aliases: ['dir'] }\n],\n```"
|
|
5141
|
+
"\n```js\navailableOptions: [\n { name: 'dry-run', type: Boolean, default: false, aliases: ['d'] },\n { name: 'verbose', type: Boolean, default: false, aliases: ['v'] },\n { name: 'blueprint', type: String, default: 'app', aliases: ['b'] },\n { name: 'skip-npm', type: Boolean, default: false, aliases: ['sn', 'skip-install', 'si'] },\n { name: 'skip-git', type: Boolean, default: false, aliases: ['sg'] },\n { name: 'directory', type: String , aliases: ['dir'] }\n],\n```"
|
|
5116
5142
|
],
|
|
5117
5143
|
"class": "Command",
|
|
5118
5144
|
"module": "ember-cli"
|
package/lib/commands/addon.js
CHANGED
|
@@ -11,7 +11,7 @@ module.exports = NewCommand.extend({
|
|
|
11
11
|
{ name: 'dry-run', type: Boolean, default: false, aliases: ['d'] },
|
|
12
12
|
{ name: 'verbose', type: Boolean, default: false, aliases: ['v'] },
|
|
13
13
|
{ name: 'blueprint', type: String, default: 'addon', aliases: ['b'] },
|
|
14
|
-
{ name: 'skip-npm', type: Boolean, default: false, aliases: ['sn'] },
|
|
14
|
+
{ name: 'skip-npm', type: Boolean, default: false, aliases: ['sn', 'skip-install', 'si'] },
|
|
15
15
|
{ name: 'skip-git', type: Boolean, default: false, aliases: ['sg'] },
|
|
16
16
|
{
|
|
17
17
|
name: 'package-manager',
|
package/lib/commands/init.js
CHANGED
|
@@ -9,6 +9,7 @@ const normalizeBlueprint = require('../utilities/normalize-blueprint-option');
|
|
|
9
9
|
const mergeBlueprintOptions = require('../utilities/merge-blueprint-options');
|
|
10
10
|
const { isPnpmProject, isYarnProject } = require('../utilities/package-managers');
|
|
11
11
|
const getLangArg = require('../../lib/utilities/get-lang-arg');
|
|
12
|
+
const { deprecate } = require('../debug');
|
|
12
13
|
|
|
13
14
|
module.exports = Command.extend({
|
|
14
15
|
name: 'init',
|
|
@@ -19,7 +20,7 @@ module.exports = Command.extend({
|
|
|
19
20
|
{ name: 'dry-run', type: Boolean, default: false, aliases: ['d'] },
|
|
20
21
|
{ name: 'verbose', type: Boolean, default: false, aliases: ['v'] },
|
|
21
22
|
{ name: 'blueprint', type: String, aliases: ['b'] },
|
|
22
|
-
{ name: 'skip-npm', type: Boolean, default: false, aliases: ['sn'] },
|
|
23
|
+
{ name: 'skip-npm', type: Boolean, default: false, aliases: ['sn', 'skip-install', 'si'] },
|
|
23
24
|
{ name: 'lint-fix', type: Boolean, default: true },
|
|
24
25
|
{
|
|
25
26
|
name: 'welcome',
|
|
@@ -119,6 +120,25 @@ module.exports = Command.extend({
|
|
|
119
120
|
const projectName = this.project.name();
|
|
120
121
|
const prependEmoji = require('../../lib/utilities/prepend-emoji');
|
|
121
122
|
|
|
123
|
+
if (ciProvider === 'travis') {
|
|
124
|
+
this.ui.writeLine('');
|
|
125
|
+
|
|
126
|
+
deprecate(
|
|
127
|
+
'Support for generating a Travis CI config file is deprecated.\nYou can keep using Travis CI, or you could also consider switching to GitHub Actions instead.',
|
|
128
|
+
false,
|
|
129
|
+
{
|
|
130
|
+
for: 'ember-cli',
|
|
131
|
+
id: 'travis-ci-support',
|
|
132
|
+
since: {
|
|
133
|
+
available: '5.5.0',
|
|
134
|
+
enabled: '5.5.0',
|
|
135
|
+
},
|
|
136
|
+
until: '6.0.0',
|
|
137
|
+
url: 'https://deprecations.emberjs.com/id/travis-ci-support',
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
122
142
|
this.ui.writeLine('');
|
|
123
143
|
this.ui.writeLine(prependEmoji('🎉', `Successfully created project ${chalk.yellow(projectName)}.`));
|
|
124
144
|
this.ui.writeLine(prependEmoji('👉', 'Get started by typing:'));
|
package/lib/commands/new.js
CHANGED
|
@@ -17,7 +17,7 @@ module.exports = Command.extend({
|
|
|
17
17
|
{ name: 'dry-run', type: Boolean, default: false, aliases: ['d'] },
|
|
18
18
|
{ name: 'verbose', type: Boolean, default: false, aliases: ['v'] },
|
|
19
19
|
{ name: 'blueprint', type: String, default: 'app', aliases: ['b'] },
|
|
20
|
-
{ name: 'skip-npm', type: Boolean, default: false, aliases: ['sn'] },
|
|
20
|
+
{ name: 'skip-npm', type: Boolean, default: false, aliases: ['sn', 'skip-install', 'si'] },
|
|
21
21
|
{ name: 'skip-git', type: Boolean, default: false, aliases: ['sg'] },
|
|
22
22
|
{
|
|
23
23
|
name: 'welcome',
|
package/lib/debug/deprecate.js
CHANGED
|
@@ -74,6 +74,7 @@ function deprecate(description, condition, options) {
|
|
|
74
74
|
let message = formatMessage(description, options);
|
|
75
75
|
|
|
76
76
|
warn(message);
|
|
77
|
+
warn('');
|
|
77
78
|
warn(getStackTrace());
|
|
78
79
|
|
|
79
80
|
// Return the message for testing purposes.
|
|
@@ -86,13 +87,21 @@ function isSemVer(version) {
|
|
|
86
87
|
}
|
|
87
88
|
|
|
88
89
|
function formatMessage(description, options) {
|
|
89
|
-
let message = [
|
|
90
|
+
let message = [
|
|
91
|
+
chalk.inverse(' DEPRECATION '),
|
|
92
|
+
'\n\n',
|
|
93
|
+
description,
|
|
94
|
+
'\n\n',
|
|
95
|
+
`ID ${options.id}`,
|
|
96
|
+
'\n',
|
|
97
|
+
`UNTIL ${options.until}`,
|
|
98
|
+
];
|
|
90
99
|
|
|
91
100
|
if (options.url) {
|
|
92
|
-
message.push(`
|
|
101
|
+
message.push('\n', `URL ${options.url}`);
|
|
93
102
|
}
|
|
94
103
|
|
|
95
|
-
return message.join('
|
|
104
|
+
return message.join('');
|
|
96
105
|
}
|
|
97
106
|
|
|
98
107
|
function getStackTrace() {
|
package/lib/models/blueprint.js
CHANGED
|
@@ -529,15 +529,54 @@ let Blueprint = CoreObject.extend({
|
|
|
529
529
|
async convertToJS(fileInfo) {
|
|
530
530
|
let rendered = await fileInfo.render();
|
|
531
531
|
|
|
532
|
+
fileInfo.rendered = await this.removeTypes(path.extname(fileInfo.displayPath), rendered);
|
|
533
|
+
fileInfo.displayPath = replaceTypeScriptExtension(fileInfo.displayPath);
|
|
534
|
+
fileInfo.outputPath = replaceTypeScriptExtension(fileInfo.outputPath);
|
|
535
|
+
|
|
536
|
+
return fileInfo;
|
|
537
|
+
},
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
@private
|
|
541
|
+
@method removeTypes
|
|
542
|
+
@param {string} extension
|
|
543
|
+
@param {string} code
|
|
544
|
+
@return {Promise}
|
|
545
|
+
*/
|
|
546
|
+
async removeTypes(extension, code) {
|
|
532
547
|
const { removeTypes } = require('remove-types');
|
|
533
|
-
const transformed = await removeTypes(rendered);
|
|
534
548
|
|
|
535
|
-
|
|
549
|
+
if (extension === '.gts') {
|
|
550
|
+
const { parseTemplates } = require('ember-template-tag');
|
|
551
|
+
// Strip template tags
|
|
552
|
+
const templateTagIdentifier = (index) => `template = __TEMPLATE_TAG_${index}__;`;
|
|
553
|
+
const templateTagIdentifierBraces = (index) => `(template = __TEMPLATE_TAG_${index}__);`;
|
|
554
|
+
const templateTagMatches = parseTemplates(code).filter((match) => match.type === 'template-tag');
|
|
555
|
+
let strippedCode = code;
|
|
556
|
+
for (let i = 0; i < templateTagMatches.length; i++) {
|
|
557
|
+
const match = templateTagMatches[i];
|
|
558
|
+
const [matchStart, matchEnd] = match.range;
|
|
559
|
+
const templateTag = code.substring(matchStart, matchEnd);
|
|
560
|
+
strippedCode = strippedCode.replace(templateTag, templateTagIdentifier(i));
|
|
561
|
+
}
|
|
536
562
|
|
|
537
|
-
|
|
538
|
-
|
|
563
|
+
// Remove types
|
|
564
|
+
const transformed = await removeTypes(strippedCode);
|
|
565
|
+
|
|
566
|
+
// Readd stripped template tags
|
|
567
|
+
let transformedWithTemplateTag = transformed;
|
|
568
|
+
for (let i = 0; i < templateTagMatches.length; i++) {
|
|
569
|
+
const match = templateTagMatches[i];
|
|
570
|
+
const [matchStart, matchEnd] = match.range;
|
|
571
|
+
const templateTag = code.substring(matchStart, matchEnd);
|
|
572
|
+
transformedWithTemplateTag = transformedWithTemplateTag.replace(templateTagIdentifier(i), templateTag);
|
|
573
|
+
transformedWithTemplateTag = transformedWithTemplateTag.replace(templateTagIdentifierBraces(i), templateTag);
|
|
574
|
+
}
|
|
539
575
|
|
|
540
|
-
|
|
576
|
+
return transformedWithTemplateTag;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
return await removeTypes(code);
|
|
541
580
|
},
|
|
542
581
|
|
|
543
582
|
/**
|
|
@@ -893,8 +932,8 @@ let Blueprint = CoreObject.extend({
|
|
|
893
932
|
|
|
894
933
|
const jsInfo = new FileInfo({
|
|
895
934
|
...info,
|
|
896
|
-
outputPath:
|
|
897
|
-
displayPath:
|
|
935
|
+
outputPath: replaceTypeScriptExtension(info.outputPath),
|
|
936
|
+
displayPath: replaceTypeScriptExtension(info.displayPath),
|
|
898
937
|
});
|
|
899
938
|
|
|
900
939
|
if (this.options.typescript === false) {
|
|
@@ -1714,12 +1753,23 @@ function replaceExtension(filePath, newExt) {
|
|
|
1714
1753
|
});
|
|
1715
1754
|
}
|
|
1716
1755
|
|
|
1756
|
+
function replaceTypeScriptExtension(filePath) {
|
|
1757
|
+
const extensionMap = {
|
|
1758
|
+
'.ts': '.js',
|
|
1759
|
+
'.gts': '.gjs',
|
|
1760
|
+
};
|
|
1761
|
+
const ext = path.extname(filePath);
|
|
1762
|
+
const newExt = extensionMap[ext];
|
|
1763
|
+
|
|
1764
|
+
return replaceExtension(filePath, newExt);
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1717
1767
|
function isTypeScriptFile(filePath) {
|
|
1718
|
-
return path.extname(filePath) === '.ts';
|
|
1768
|
+
return path.extname(filePath) === '.ts' || path.extname(filePath) === '.gts';
|
|
1719
1769
|
}
|
|
1720
1770
|
|
|
1721
1771
|
function isJavaScriptFile(filePath) {
|
|
1722
|
-
return path.extname(filePath) === '.js';
|
|
1772
|
+
return path.extname(filePath) === '.js' || path.extname(filePath) === '.gjs';
|
|
1723
1773
|
}
|
|
1724
1774
|
|
|
1725
1775
|
module.exports = Blueprint;
|
package/lib/models/command.js
CHANGED
|
@@ -126,7 +126,7 @@ let Command = CoreObject.extend({
|
|
|
126
126
|
* { name: 'dry-run', type: Boolean, default: false, aliases: ['d'] },
|
|
127
127
|
* { name: 'verbose', type: Boolean, default: false, aliases: ['v'] },
|
|
128
128
|
* { name: 'blueprint', type: String, default: 'app', aliases: ['b'] },
|
|
129
|
-
* { name: 'skip-npm', type: Boolean, default: false, aliases: ['sn'] },
|
|
129
|
+
* { name: 'skip-npm', type: Boolean, default: false, aliases: ['sn', 'skip-install', 'si'] },
|
|
130
130
|
* { name: 'skip-git', type: Boolean, default: false, aliases: ['sg'] },
|
|
131
131
|
* { name: 'directory', type: String , aliases: ['dir'] }
|
|
132
132
|
* ],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0-beta.0",
|
|
4
4
|
"description": "Command line tool for developing ambitious ember.js apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"ember-cli-normalize-entity-name": "^1.0.0",
|
|
68
68
|
"ember-cli-preprocess-registry": "^5.0.1",
|
|
69
69
|
"ember-cli-string-utils": "^1.1.0",
|
|
70
|
+
"ember-template-tag": "^2.3.8",
|
|
70
71
|
"ensure-posix-path": "^1.1.1",
|
|
71
72
|
"execa": "^5.1.1",
|
|
72
73
|
"exit": "^0.1.2",
|