@ember-tooling/classic-build-app-blueprint 0.0.0 → 6.7.0-alpha.4
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/LICENSE +21 -0
- package/files/.editorconfig +19 -0
- package/files/.ember-cli +19 -0
- package/files/.github/workflows/ci.yml +53 -0
- package/files/.prettierignore +13 -0
- package/files/.prettierrc.js +14 -0
- package/files/.stylelintignore +5 -0
- package/files/.stylelintrc.js +5 -0
- package/files/.template-lintrc.js +5 -0
- package/files/.watchmanconfig +3 -0
- package/files/README.md +58 -0
- package/files/_js_eslint.config.mjs +123 -0
- package/files/_ts_eslint.config.mjs +146 -0
- package/files/app/app.ts +17 -0
- package/files/app/components/.gitkeep +0 -0
- package/files/app/config/environment.d.ts +14 -0
- package/files/app/controllers/.gitkeep +0 -0
- package/files/app/deprecation-workflow.ts +24 -0
- package/files/app/helpers/.gitkeep +0 -0
- package/files/app/index.html +24 -0
- package/files/app/models/.gitkeep +0 -0
- package/files/app/router.ts +11 -0
- package/files/app/routes/.gitkeep +0 -0
- package/files/app/styles/app.css +1 -0
- package/files/app/templates/_js_application.gjs +15 -0
- package/files/app/templates/_ts_application.gts +15 -0
- package/files/app/templates/application.hbs +10 -0
- package/files/config/ember-cli-update.json +18 -0
- package/files/config/environment.js +48 -0
- package/files/config/optional-features.json +7 -0
- package/files/config/targets.js +11 -0
- package/files/ember-cli-build.js +33 -0
- package/files/gitignore +18 -0
- package/files/package.json +107 -0
- package/files/public/robots.txt +3 -0
- package/files/testem.js +23 -0
- package/files/tests/helpers/index.ts +43 -0
- package/files/tests/index.html +39 -0
- package/files/tests/integration/.gitkeep +0 -0
- package/files/tests/test-helper.ts +14 -0
- package/files/tests/unit/.gitkeep +0 -0
- package/files/tsconfig.json +18 -0
- package/files/types/global.d.ts +1 -0
- package/index.js +172 -0
- package/package.json +20 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2013 Stefan Penner, Robert Jackson and ember-cli contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# EditorConfig helps developers define and maintain consistent
|
|
2
|
+
# coding styles between different editors and IDEs
|
|
3
|
+
# editorconfig.org
|
|
4
|
+
|
|
5
|
+
root = true
|
|
6
|
+
|
|
7
|
+
[*]
|
|
8
|
+
end_of_line = lf
|
|
9
|
+
charset = utf-8
|
|
10
|
+
trim_trailing_whitespace = true
|
|
11
|
+
insert_final_newline = true
|
|
12
|
+
indent_style = space
|
|
13
|
+
indent_size = 2
|
|
14
|
+
|
|
15
|
+
[*.hbs]
|
|
16
|
+
insert_final_newline = false
|
|
17
|
+
|
|
18
|
+
[*.{diff,md}]
|
|
19
|
+
trim_trailing_whitespace = false
|
package/files/.ember-cli
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
/**
|
|
3
|
+
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
|
|
4
|
+
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
|
|
5
|
+
*/
|
|
6
|
+
"isTypeScriptProject": <%= typescript ? 'true' : 'false' %>,
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
Setting `componentAuthoringFormat` to "strict" will force the blueprint generators to generate GJS
|
|
10
|
+
or GTS files for the component and the component rendering test. "loose" is the default.
|
|
11
|
+
*/
|
|
12
|
+
"componentAuthoringFormat": <%= strict ? '"strict"' : '"loose"' %>,
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
Setting `routeAuthoringFormat` to "strict" will force the blueprint generators to generate GJS
|
|
16
|
+
or GTS templates for routes. "loose" is the default
|
|
17
|
+
*/
|
|
18
|
+
"routeAuthoringFormat": <%= strict ? '"strict"' : '"loose"' %>
|
|
19
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- master
|
|
8
|
+
pull_request: {}
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ci-${{ github.head_ref || github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
lint:
|
|
16
|
+
name: "Lint"
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
timeout-minutes: 10
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v3<% if (pnpm) { %>
|
|
22
|
+
- uses: pnpm/action-setup@v4
|
|
23
|
+
with:
|
|
24
|
+
version: 9<% } %>
|
|
25
|
+
- name: Install Node
|
|
26
|
+
uses: actions/setup-node@v3
|
|
27
|
+
with:
|
|
28
|
+
node-version: 18
|
|
29
|
+
cache: <%= pnpm ? 'pnpm' : yarn ? 'yarn' : 'npm' %>
|
|
30
|
+
- name: Install Dependencies
|
|
31
|
+
run: <%= pnpm ? 'pnpm install --frozen-lockfile' : yarn ? 'yarn install --frozen-lockfile' : 'npm ci' %>
|
|
32
|
+
- name: Lint
|
|
33
|
+
run: <%= pnpm ? 'pnpm' : yarn ? 'yarn' : 'npm run' %> lint
|
|
34
|
+
|
|
35
|
+
test:
|
|
36
|
+
name: "Test"
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
timeout-minutes: 10
|
|
39
|
+
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v3<% if (pnpm) { %>
|
|
42
|
+
- uses: pnpm/action-setup@v4
|
|
43
|
+
with:
|
|
44
|
+
version: 9<% } %>
|
|
45
|
+
- name: Install Node
|
|
46
|
+
uses: actions/setup-node@v3
|
|
47
|
+
with:
|
|
48
|
+
node-version: 18
|
|
49
|
+
cache: <%= pnpm ? 'pnpm' : yarn ? 'yarn' : 'npm' %>
|
|
50
|
+
- name: Install Dependencies
|
|
51
|
+
run: <%= pnpm ? 'pnpm install --frozen-lockfile' : yarn ? 'yarn install --frozen-lockfile' : 'npm ci' %>
|
|
52
|
+
- name: Run Tests
|
|
53
|
+
run: <%= pnpm ? 'pnpm' : yarn ? 'yarn' : 'npm' %> test
|
package/files/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# <%= name %>
|
|
2
|
+
|
|
3
|
+
This README outlines the details of collaborating on this Ember application.
|
|
4
|
+
A short introduction of this app could easily go here.
|
|
5
|
+
|
|
6
|
+
## Prerequisites
|
|
7
|
+
|
|
8
|
+
You will need the following things properly installed on your computer.
|
|
9
|
+
|
|
10
|
+
- [Git](https://git-scm.com/)
|
|
11
|
+
- [Node.js](https://nodejs.org/)<% if (pnpm) { %>
|
|
12
|
+
- [pnpm](https://pnpm.io/)<% } else if (yarn) { %>
|
|
13
|
+
- [Yarn](https://yarnpkg.com/)<% } else { %> (with npm)<% } %>
|
|
14
|
+
- [Ember CLI](https://cli.emberjs.com/release/)
|
|
15
|
+
- [Google Chrome](https://google.com/chrome/)
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
- `git clone <repository-url>` this repository
|
|
20
|
+
- `cd <%= appDirectory %>`
|
|
21
|
+
- `<% if (pnpm) { %>pnpm<% } else if (yarn) { %>yarn<% } else { %>npm<% } %> install`
|
|
22
|
+
|
|
23
|
+
## Running / Development
|
|
24
|
+
|
|
25
|
+
- `<%= invokeScriptPrefix %> start`
|
|
26
|
+
- Visit your app at [http://localhost:4200](http://localhost:4200).
|
|
27
|
+
- Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).
|
|
28
|
+
|
|
29
|
+
### Code Generators
|
|
30
|
+
|
|
31
|
+
Make use of the many generators for code, try `ember help generate` for more details
|
|
32
|
+
|
|
33
|
+
### Running Tests
|
|
34
|
+
|
|
35
|
+
- `<%= invokeScriptPrefix %> test`
|
|
36
|
+
- `<%= invokeScriptPrefix %> test:ember <% if (npm) { %>-- <% } %>--server`
|
|
37
|
+
|
|
38
|
+
### Linting
|
|
39
|
+
|
|
40
|
+
- `<%= invokeScriptPrefix %> lint`
|
|
41
|
+
- `<%= invokeScriptPrefix %> lint:fix`
|
|
42
|
+
|
|
43
|
+
### Building
|
|
44
|
+
|
|
45
|
+
- `<%= execBinPrefix %> ember build` (development)
|
|
46
|
+
- `<%= invokeScriptPrefix %> build` (production)
|
|
47
|
+
|
|
48
|
+
### Deploying
|
|
49
|
+
|
|
50
|
+
Specify what it takes to deploy your app.
|
|
51
|
+
|
|
52
|
+
## Further Reading / Useful Links
|
|
53
|
+
|
|
54
|
+
- [ember.js](https://emberjs.com/)
|
|
55
|
+
- [ember-cli](https://cli.emberjs.com/release/)
|
|
56
|
+
- Development Browser Extensions
|
|
57
|
+
- [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
|
|
58
|
+
- [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Debugging:
|
|
3
|
+
* https://eslint.org/docs/latest/use/configure/debug
|
|
4
|
+
* ----------------------------------------------------
|
|
5
|
+
*
|
|
6
|
+
* Print a file's calculated configuration
|
|
7
|
+
*
|
|
8
|
+
* npx eslint --print-config path/to/file.js
|
|
9
|
+
*
|
|
10
|
+
* Inspecting the config
|
|
11
|
+
*
|
|
12
|
+
* npx eslint --inspect-config
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
import globals from 'globals';
|
|
16
|
+
import js from '@eslint/js';
|
|
17
|
+
|
|
18
|
+
import ember from 'eslint-plugin-ember/recommended';
|
|
19
|
+
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
20
|
+
import qunit from 'eslint-plugin-qunit';
|
|
21
|
+
import n from 'eslint-plugin-n';
|
|
22
|
+
|
|
23
|
+
import babelParser from '@babel/eslint-parser';
|
|
24
|
+
|
|
25
|
+
const esmParserOptions = {
|
|
26
|
+
ecmaFeatures: { modules: true },
|
|
27
|
+
ecmaVersion: 'latest',
|
|
28
|
+
requireConfigFile: false,
|
|
29
|
+
babelOptions: {
|
|
30
|
+
plugins: [
|
|
31
|
+
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export default [
|
|
37
|
+
js.configs.recommended,
|
|
38
|
+
eslintConfigPrettier,
|
|
39
|
+
ember.configs.base,
|
|
40
|
+
ember.configs.gjs,
|
|
41
|
+
/**
|
|
42
|
+
* Ignores must be in their own object
|
|
43
|
+
* https://eslint.org/docs/latest/use/configure/ignore
|
|
44
|
+
*/
|
|
45
|
+
{
|
|
46
|
+
ignores: ['dist/', 'node_modules/', 'coverage/', '!**/.*'],
|
|
47
|
+
},
|
|
48
|
+
/**
|
|
49
|
+
* https://eslint.org/docs/latest/use/configure/configuration-files#configuring-linter-options
|
|
50
|
+
*/
|
|
51
|
+
{
|
|
52
|
+
linterOptions: {
|
|
53
|
+
reportUnusedDisableDirectives: 'error',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
files: ['**/*.js'],
|
|
58
|
+
languageOptions: {
|
|
59
|
+
parser: babelParser,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
files: ['**/*.{js,gjs}'],
|
|
64
|
+
languageOptions: {
|
|
65
|
+
parserOptions: esmParserOptions,
|
|
66
|
+
globals: {
|
|
67
|
+
...globals.browser,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
files: ['tests/**/*-test.{js,gjs}'],
|
|
73
|
+
plugins: {
|
|
74
|
+
qunit,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
/**
|
|
78
|
+
* CJS node files
|
|
79
|
+
*/
|
|
80
|
+
{
|
|
81
|
+
files: [
|
|
82
|
+
'**/*.cjs',
|
|
83
|
+
'config/**/*.js',
|
|
84
|
+
'tests/dummy/config/**/*.js',
|
|
85
|
+
'testem.js',
|
|
86
|
+
'testem*.js',
|
|
87
|
+
'index.js',
|
|
88
|
+
'.prettierrc.js',
|
|
89
|
+
'.stylelintrc.js',
|
|
90
|
+
'.template-lintrc.js',
|
|
91
|
+
'ember-cli-build.js',
|
|
92
|
+
],
|
|
93
|
+
plugins: {
|
|
94
|
+
n,
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
languageOptions: {
|
|
98
|
+
sourceType: 'script',
|
|
99
|
+
ecmaVersion: 'latest',
|
|
100
|
+
globals: {
|
|
101
|
+
...globals.node,
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
/**
|
|
106
|
+
* ESM node files
|
|
107
|
+
*/
|
|
108
|
+
{
|
|
109
|
+
files: ['**/*.mjs'],
|
|
110
|
+
plugins: {
|
|
111
|
+
n,
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
languageOptions: {
|
|
115
|
+
sourceType: 'module',
|
|
116
|
+
ecmaVersion: 'latest',
|
|
117
|
+
parserOptions: esmParserOptions,
|
|
118
|
+
globals: {
|
|
119
|
+
...globals.node,
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
];
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Debugging:
|
|
3
|
+
* https://eslint.org/docs/latest/use/configure/debug
|
|
4
|
+
* ----------------------------------------------------
|
|
5
|
+
*
|
|
6
|
+
* Print a file's calculated configuration
|
|
7
|
+
*
|
|
8
|
+
* npx eslint --print-config path/to/file.js
|
|
9
|
+
*
|
|
10
|
+
* Inspecting the config
|
|
11
|
+
*
|
|
12
|
+
* npx eslint --inspect-config
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
import globals from 'globals';
|
|
16
|
+
import js from '@eslint/js';
|
|
17
|
+
|
|
18
|
+
import ts from 'typescript-eslint';
|
|
19
|
+
|
|
20
|
+
import ember from 'eslint-plugin-ember/recommended';
|
|
21
|
+
|
|
22
|
+
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
23
|
+
import qunit from 'eslint-plugin-qunit';
|
|
24
|
+
import n from 'eslint-plugin-n';
|
|
25
|
+
|
|
26
|
+
import babelParser from '@babel/eslint-parser';
|
|
27
|
+
|
|
28
|
+
const parserOptions = {
|
|
29
|
+
esm: {
|
|
30
|
+
js: {
|
|
31
|
+
ecmaFeatures: { modules: true },
|
|
32
|
+
ecmaVersion: 'latest',
|
|
33
|
+
requireConfigFile: false,
|
|
34
|
+
babelOptions: {
|
|
35
|
+
plugins: [
|
|
36
|
+
[
|
|
37
|
+
'@babel/plugin-proposal-decorators',
|
|
38
|
+
{ decoratorsBeforeExport: true },
|
|
39
|
+
],
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
ts: {
|
|
44
|
+
projectService: true,
|
|
45
|
+
tsconfigRootDir: import.meta.dirname,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export default ts.config(
|
|
51
|
+
js.configs.recommended,
|
|
52
|
+
ember.configs.base,
|
|
53
|
+
ember.configs.gjs,
|
|
54
|
+
ember.configs.gts,
|
|
55
|
+
eslintConfigPrettier,
|
|
56
|
+
/**
|
|
57
|
+
* Ignores must be in their own object
|
|
58
|
+
* https://eslint.org/docs/latest/use/configure/ignore
|
|
59
|
+
*/
|
|
60
|
+
{
|
|
61
|
+
ignores: ['dist/', 'node_modules/', 'coverage/', '!**/.*'],
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* https://eslint.org/docs/latest/use/configure/configuration-files#configuring-linter-options
|
|
65
|
+
*/
|
|
66
|
+
{
|
|
67
|
+
linterOptions: {
|
|
68
|
+
reportUnusedDisableDirectives: 'error',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
files: ['**/*.js'],
|
|
73
|
+
languageOptions: {
|
|
74
|
+
parser: babelParser,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
files: ['**/*.{js,gjs}'],
|
|
79
|
+
languageOptions: {
|
|
80
|
+
parserOptions: parserOptions.esm.js,
|
|
81
|
+
globals: {
|
|
82
|
+
...globals.browser,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
files: ['**/*.{ts,gts}'],
|
|
88
|
+
languageOptions: {
|
|
89
|
+
parser: ember.parser,
|
|
90
|
+
parserOptions: parserOptions.esm.ts,
|
|
91
|
+
},
|
|
92
|
+
extends: [...ts.configs.recommendedTypeChecked, ember.configs.gts],
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
files: ['tests/**/*-test.{js,gjs,ts,gts}'],
|
|
96
|
+
plugins: {
|
|
97
|
+
qunit,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
/**
|
|
101
|
+
* CJS node files
|
|
102
|
+
*/
|
|
103
|
+
{
|
|
104
|
+
files: [
|
|
105
|
+
'**/*.cjs',
|
|
106
|
+
'config/**/*.js',
|
|
107
|
+
'tests/dummy/config/**/*.js',
|
|
108
|
+
'testem.js',
|
|
109
|
+
'testem*.js',
|
|
110
|
+
'index.js',
|
|
111
|
+
'.prettierrc.js',
|
|
112
|
+
'.stylelintrc.js',
|
|
113
|
+
'.template-lintrc.js',
|
|
114
|
+
'ember-cli-build.js',
|
|
115
|
+
],
|
|
116
|
+
plugins: {
|
|
117
|
+
n,
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
languageOptions: {
|
|
121
|
+
sourceType: 'script',
|
|
122
|
+
ecmaVersion: 'latest',
|
|
123
|
+
globals: {
|
|
124
|
+
...globals.node,
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
/**
|
|
129
|
+
* ESM node files
|
|
130
|
+
*/
|
|
131
|
+
{
|
|
132
|
+
files: ['**/*.mjs'],
|
|
133
|
+
plugins: {
|
|
134
|
+
n,
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
languageOptions: {
|
|
138
|
+
sourceType: 'module',
|
|
139
|
+
ecmaVersion: 'latest',
|
|
140
|
+
parserOptions: parserOptions.esm.js,
|
|
141
|
+
globals: {
|
|
142
|
+
...globals.node,
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
);
|
package/files/app/app.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Application from '@ember/application';
|
|
2
|
+
import Resolver from 'ember-resolver';
|
|
3
|
+
import loadInitializers from 'ember-load-initializers';
|
|
4
|
+
import config from '<%= modulePrefix %>/config/environment';
|
|
5
|
+
import { importSync, isDevelopingApp, macroCondition } from '@embroider/macros';
|
|
6
|
+
|
|
7
|
+
if (macroCondition(isDevelopingApp())) {
|
|
8
|
+
importSync('./deprecation-workflow');
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default class App extends Application {
|
|
12
|
+
modulePrefix = config.modulePrefix;
|
|
13
|
+
podModulePrefix = config.podModulePrefix;
|
|
14
|
+
Resolver = Resolver;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
loadInitializers(App, config.modulePrefix);
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type declarations for
|
|
3
|
+
* import config from '<%= name %>/config/environment'
|
|
4
|
+
*/
|
|
5
|
+
declare const config: {
|
|
6
|
+
environment: string;
|
|
7
|
+
modulePrefix: string;
|
|
8
|
+
podModulePrefix: string;
|
|
9
|
+
locationType: 'history' | 'hash' | 'none';
|
|
10
|
+
rootURL: string;
|
|
11
|
+
APP: Record<string, unknown>;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default config;
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import setupDeprecationWorkflow from 'ember-cli-deprecation-workflow';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Docs: https://github.com/ember-cli/ember-cli-deprecation-workflow
|
|
5
|
+
*/
|
|
6
|
+
setupDeprecationWorkflow({
|
|
7
|
+
/**
|
|
8
|
+
false by default, but if a developer / team wants to be more aggressive about being proactive with
|
|
9
|
+
handling their deprecations, this should be set to "true"
|
|
10
|
+
*/
|
|
11
|
+
throwOnUnhandled: false,
|
|
12
|
+
workflow: [
|
|
13
|
+
/* ... handlers ... */
|
|
14
|
+
/* to generate this list, run your app for a while (or run the test suite),
|
|
15
|
+
* and then run in the browser console:
|
|
16
|
+
*
|
|
17
|
+
* deprecationWorkflow.flushDeprecations()
|
|
18
|
+
*
|
|
19
|
+
* And copy the handlers here
|
|
20
|
+
*/
|
|
21
|
+
/* example: */
|
|
22
|
+
/* { handler: 'silence', matchId: 'template-action' }, */
|
|
23
|
+
],
|
|
24
|
+
});
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html<% if(lang) { %> lang="<%= lang %>"<% } %>>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title><%= namespace %></title>
|
|
6
|
+
<meta name="description" content="">
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
8
|
+
|
|
9
|
+
{{content-for "head"}}
|
|
10
|
+
|
|
11
|
+
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
|
|
12
|
+
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/<%= name %>.css">
|
|
13
|
+
|
|
14
|
+
{{content-for "head-footer"}}
|
|
15
|
+
</head>
|
|
16
|
+
<body>
|
|
17
|
+
{{content-for "body"}}
|
|
18
|
+
|
|
19
|
+
<script src="{{rootURL}}assets/vendor.js"></script>
|
|
20
|
+
<script src="{{rootURL}}assets/<%= name %>.js"></script>
|
|
21
|
+
|
|
22
|
+
{{content-for "body-footer"}}
|
|
23
|
+
</body>
|
|
24
|
+
</html>
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import EmberRouter from '@ember/routing/router';
|
|
2
|
+
import config from '<%= modulePrefix %>/config/environment';
|
|
3
|
+
|
|
4
|
+
export default class Router extends EmberRouter {
|
|
5
|
+
location = config.locationType;
|
|
6
|
+
rootURL = config.rootURL;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
Router.map(function () {<% if (typescript) { %>
|
|
10
|
+
// Add route declarations here
|
|
11
|
+
<% } %>});
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* Ember supports plain CSS out of the box. More info: https://cli.emberjs.com/release/advanced-use/stylesheets/ */
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import pageTitle from 'ember-page-title/helpers/page-title';<% if (welcome) { %>
|
|
2
|
+
import WelcomePage from 'ember-welcome-page/components/welcome-page';<% } %>
|
|
3
|
+
|
|
4
|
+
<template>
|
|
5
|
+
{{pageTitle "<%= namespace %>"}}
|
|
6
|
+
<% if (welcome) { %>
|
|
7
|
+
{{outlet}}
|
|
8
|
+
|
|
9
|
+
{{! The following component displays Ember's default welcome message. }}
|
|
10
|
+
<WelcomePage />
|
|
11
|
+
{{! Feel free to remove this! }}<% } else { %>
|
|
12
|
+
<h2 id="title">Welcome to Ember</h2>
|
|
13
|
+
|
|
14
|
+
{{outlet}}<% } %>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import pageTitle from 'ember-page-title/helpers/page-title';<% if (welcome) { %>
|
|
2
|
+
import WelcomePage from 'ember-welcome-page/components/welcome-page';<% } %>
|
|
3
|
+
|
|
4
|
+
<template>
|
|
5
|
+
{{pageTitle "<%= namespace %>"}}
|
|
6
|
+
<% if (welcome) { %>
|
|
7
|
+
{{outlet}}
|
|
8
|
+
|
|
9
|
+
{{! The following component displays Ember's default welcome message. }}
|
|
10
|
+
<WelcomePage />
|
|
11
|
+
{{! Feel free to remove this! }}<% } else { %>
|
|
12
|
+
<h2 id="title">Welcome to Ember</h2>
|
|
13
|
+
|
|
14
|
+
{{outlet}}<% } %>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{{page-title "<%= namespace %>"}}
|
|
2
|
+
<% if (welcome) { %>
|
|
3
|
+
{{outlet}}
|
|
4
|
+
|
|
5
|
+
{{! The following component displays Ember's default welcome message. }}
|
|
6
|
+
<WelcomePage />
|
|
7
|
+
{{! Feel free to remove this! }}<% } else { %>
|
|
8
|
+
<h2 id="title">Welcome to Ember</h2>
|
|
9
|
+
|
|
10
|
+
{{outlet}}<% } %>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"packages": [
|
|
4
|
+
{
|
|
5
|
+
"name": "ember-cli",
|
|
6
|
+
"version": "<%= blueprintVersion %>",
|
|
7
|
+
"blueprints": [
|
|
8
|
+
{
|
|
9
|
+
"name": "<%= blueprint %>",
|
|
10
|
+
"outputRepo": "https://github.com/ember-cli/ember-<%= blueprint === 'app' ? 'new' : 'addon' %>-output",
|
|
11
|
+
"codemodsSource": "ember-<%= blueprint %>-codemods-manifest@1",
|
|
12
|
+
"isBaseBlueprint": true,
|
|
13
|
+
"options": [<%= blueprintOptions %>]
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = function (environment) {
|
|
4
|
+
const ENV = {
|
|
5
|
+
modulePrefix: '<%= modulePrefix %>',
|
|
6
|
+
environment,
|
|
7
|
+
rootURL: '/',
|
|
8
|
+
locationType: 'history',
|
|
9
|
+
EmberENV: {
|
|
10
|
+
EXTEND_PROTOTYPES: false,
|
|
11
|
+
FEATURES: {
|
|
12
|
+
// Here you can enable experimental features on an ember canary build
|
|
13
|
+
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
APP: {
|
|
18
|
+
// Here you can pass flags/options to your application instance
|
|
19
|
+
// when it is created
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
if (environment === 'development') {
|
|
24
|
+
// ENV.APP.LOG_RESOLVER = true;
|
|
25
|
+
// ENV.APP.LOG_ACTIVE_GENERATION = true;
|
|
26
|
+
// ENV.APP.LOG_TRANSITIONS = true;
|
|
27
|
+
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
|
|
28
|
+
// ENV.APP.LOG_VIEW_LOOKUPS = true;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (environment === 'test') {
|
|
32
|
+
// Testem prefers this...
|
|
33
|
+
ENV.locationType = 'none';
|
|
34
|
+
|
|
35
|
+
// keep test console output quieter
|
|
36
|
+
ENV.APP.LOG_ACTIVE_GENERATION = false;
|
|
37
|
+
ENV.APP.LOG_VIEW_LOOKUPS = false;
|
|
38
|
+
|
|
39
|
+
ENV.APP.rootElement = '#ember-testing';
|
|
40
|
+
ENV.APP.autoboot = false;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (environment === 'production') {
|
|
44
|
+
// here you can enable a production-specific feature
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return ENV;
|
|
48
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
|
4
|
+
|
|
5
|
+
module.exports = function (defaults) {
|
|
6
|
+
const app = new EmberApp(defaults, {
|
|
7
|
+
<% if (emberData) {%>emberData: {
|
|
8
|
+
deprecations: {
|
|
9
|
+
// New projects can safely leave this deprecation disabled.
|
|
10
|
+
// If upgrading, to opt-into the deprecated behavior, set this to true and then follow:
|
|
11
|
+
// https://deprecations.emberjs.com/id/ember-data-deprecate-store-extends-ember-object
|
|
12
|
+
// before upgrading to Ember Data 6.0
|
|
13
|
+
DEPRECATE_STORE_EXTENDS_EMBER_OBJECT: false,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
<% } %><% if (typescript) {%>'ember-cli-babel': { enableTypeScriptTransform: true },
|
|
17
|
+
|
|
18
|
+
<% } %>// Add options here
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
<% if (embroider) { %>const { Webpack } = require('@embroider/webpack');
|
|
22
|
+
return require('@embroider/compat').compatBuild(app, Webpack, {
|
|
23
|
+
staticAddonTestSupportTrees: true,
|
|
24
|
+
staticAddonTrees: true,
|
|
25
|
+
staticEmberSource: true,
|
|
26
|
+
staticInvokables: true,
|
|
27
|
+
skipBabel: [
|
|
28
|
+
{
|
|
29
|
+
package: 'qunit',
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
});<% } else { %>return app.toTree();<% } %>
|
|
33
|
+
};
|
package/files/gitignore
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "<%= name %>",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "Small description for <%= name %> goes here",
|
|
6
|
+
"repository": "",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"author": "",
|
|
9
|
+
"directories": {
|
|
10
|
+
"doc": "doc",
|
|
11
|
+
"test": "tests"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "ember build --environment=production",
|
|
15
|
+
"format": "prettier . --cache --write",
|
|
16
|
+
"lint": "concurrently \"<%= packageManager %>:lint:*(!fix)\" --names \"lint:\" --prefixColors auto",
|
|
17
|
+
"lint:css": "stylelint \"**/*.css\"",
|
|
18
|
+
"lint:css:fix": "concurrently \"<%= packageManager %>:lint:css -- --fix\"",
|
|
19
|
+
"lint:fix": "concurrently \"<%= packageManager %>:lint:*:fix\" --names \"fix:\" --prefixColors auto && <%= invokeScriptPrefix %> format",
|
|
20
|
+
"lint:format": "prettier . --cache --check",
|
|
21
|
+
"lint:hbs": "ember-template-lint .",
|
|
22
|
+
"lint:hbs:fix": "ember-template-lint . --fix",
|
|
23
|
+
"lint:js": "eslint . --cache",
|
|
24
|
+
"lint:js:fix": "eslint . --fix<% if (typescript) { %>",
|
|
25
|
+
"lint:types": "tsc --noEmit<% } %>",
|
|
26
|
+
"start": "ember serve",
|
|
27
|
+
"test": "concurrently \"<%= packageManager %>:lint\" \"<%= packageManager %>:test:*\" --names \"lint,test:\" --prefixColors auto",
|
|
28
|
+
"test:ember": "ember test"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@babel/core": "^7.27.4",
|
|
32
|
+
"@babel/eslint-parser": "^7.27.5",
|
|
33
|
+
"@babel/plugin-proposal-decorators": "^7.27.1<% if (typescript && emberData) { %>",
|
|
34
|
+
"@ember-data/adapter": "~5.6.0-alpha.12",
|
|
35
|
+
"@ember-data/graph": "~5.6.0-alpha.12",
|
|
36
|
+
"@ember-data/json-api": "~5.6.0-alpha.12",
|
|
37
|
+
"@ember-data/legacy-compat": "~5.6.0-alpha.12",
|
|
38
|
+
"@ember-data/model": "~5.6.0-alpha.12",
|
|
39
|
+
"@ember-data/request": "~5.6.0-alpha.12",
|
|
40
|
+
"@ember-data/request-utils": "~5.6.0-alpha.12",
|
|
41
|
+
"@ember-data/serializer": "~5.6.0-alpha.12",
|
|
42
|
+
"@ember-data/store": "~5.6.0-alpha.12",
|
|
43
|
+
"@warp-drive/ember": "~5.6.0-alpha.12<% } %>",
|
|
44
|
+
"@ember/optional-features": "^2.2.0",
|
|
45
|
+
"@ember/test-helpers": "^5.2.2<% if (embroider) { %>",
|
|
46
|
+
"@embroider/compat": "^3.9.0",
|
|
47
|
+
"@embroider/core": "^3.5.6<% } %>",
|
|
48
|
+
"@embroider/macros": "^1.18.0<% if (embroider) { %>",
|
|
49
|
+
"@embroider/webpack": "^4.1.0<% } %>",
|
|
50
|
+
"@eslint/js": "^9.29.0",
|
|
51
|
+
"@glimmer/component": "^2.0.0",
|
|
52
|
+
"@glimmer/tracking": "^1.1.2<% if (typescript) { %>",
|
|
53
|
+
"@glint/environment-ember-loose": "^1.5.2",
|
|
54
|
+
"@glint/environment-ember-template-imports": "^1.5.2",
|
|
55
|
+
"@glint/template": "^1.5.2",
|
|
56
|
+
"@tsconfig/ember": "^3.0.10",
|
|
57
|
+
"@types/qunit": "^2.19.12",
|
|
58
|
+
"@types/rsvp": "^4.0.9<% if (emberData) {%>",
|
|
59
|
+
"@warp-drive/core-types": "~5.6.0-alpha.12<% }} %>",
|
|
60
|
+
"broccoli-asset-rev": "^3.0.0",
|
|
61
|
+
"concurrently": "^9.1.2",
|
|
62
|
+
"ember-auto-import": "^2.10.0",
|
|
63
|
+
"ember-cli": "~6.7.0-alpha.4",
|
|
64
|
+
"ember-cli-app-version": "^7.0.0",
|
|
65
|
+
"ember-cli-babel": "^8.2.0",
|
|
66
|
+
"ember-cli-clean-css": "^3.0.0",
|
|
67
|
+
"ember-cli-dependency-checker": "^3.3.3",
|
|
68
|
+
"ember-cli-deprecation-workflow": "^3.3.0",
|
|
69
|
+
"ember-cli-htmlbars": "^6.3.0",
|
|
70
|
+
"ember-cli-inject-live-reload": "^2.1.0<% if (!embroider) { %>",
|
|
71
|
+
"ember-cli-sri": "^2.1.1",
|
|
72
|
+
"ember-cli-terser": "^4.0.2<% } %><% if (emberData) { %>",
|
|
73
|
+
"ember-data": "~5.6.0-alpha.12<% } %>",
|
|
74
|
+
"ember-load-initializers": "^3.0.1",
|
|
75
|
+
"ember-modifier": "^4.2.2",
|
|
76
|
+
"ember-page-title": "^9.0.2",
|
|
77
|
+
"ember-qunit": "^9.0.3",
|
|
78
|
+
"ember-resolver": "^13.1.1",
|
|
79
|
+
"ember-source": "~6.7.0-alpha.1",
|
|
80
|
+
"ember-template-imports": "^4.3.0",
|
|
81
|
+
"ember-template-lint": "^6.1.0<% if (welcome) { %>",
|
|
82
|
+
"ember-welcome-page": "^7.0.2<% } %>",
|
|
83
|
+
"eslint": "^9.29.0",
|
|
84
|
+
"eslint-config-prettier": "^9.1.0",
|
|
85
|
+
"eslint-plugin-ember": "^12.5.0",
|
|
86
|
+
"eslint-plugin-n": "^17.20.0",
|
|
87
|
+
"eslint-plugin-qunit": "^8.1.2",
|
|
88
|
+
"globals": "^15.15.0",
|
|
89
|
+
"loader.js": "^4.7.0",
|
|
90
|
+
"prettier": "^3.5.3",
|
|
91
|
+
"prettier-plugin-ember-template-tag": "^2.0.6",
|
|
92
|
+
"qunit": "^2.24.1",
|
|
93
|
+
"qunit-dom": "^3.4.0",
|
|
94
|
+
"stylelint": "^16.20.0",
|
|
95
|
+
"stylelint-config-standard": "^36.0.1",
|
|
96
|
+
"tracked-built-ins": "^3.4.0<% if (typescript) { %>",
|
|
97
|
+
"typescript": "^5.8.3",
|
|
98
|
+
"typescript-eslint": "^8.34.1<% } %>",
|
|
99
|
+
"webpack": "^5.99.9"
|
|
100
|
+
},
|
|
101
|
+
"engines": {
|
|
102
|
+
"node": ">= 20.11"
|
|
103
|
+
},
|
|
104
|
+
"ember": {
|
|
105
|
+
"edition": "octane"
|
|
106
|
+
}
|
|
107
|
+
}
|
package/files/testem.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
test_page: 'tests/index.html?hidepassed',
|
|
5
|
+
disable_watching: true,
|
|
6
|
+
launch_in_ci: ['Chrome'],
|
|
7
|
+
launch_in_dev: ['Chrome'],
|
|
8
|
+
browser_start_timeout: 120,
|
|
9
|
+
browser_args: {
|
|
10
|
+
Chrome: {
|
|
11
|
+
ci: [
|
|
12
|
+
// --no-sandbox is needed when running Chrome inside a container
|
|
13
|
+
process.env.CI ? '--no-sandbox' : null,
|
|
14
|
+
'--headless',
|
|
15
|
+
'--disable-dev-shm-usage',
|
|
16
|
+
'--disable-software-rasterizer',
|
|
17
|
+
'--mute-audio',
|
|
18
|
+
'--remote-debugging-port=0',
|
|
19
|
+
'--window-size=1440,900',
|
|
20
|
+
].filter(Boolean),
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
setupApplicationTest as upstreamSetupApplicationTest,
|
|
3
|
+
setupRenderingTest as upstreamSetupRenderingTest,
|
|
4
|
+
setupTest as upstreamSetupTest,
|
|
5
|
+
type SetupTestOptions,
|
|
6
|
+
} from 'ember-qunit';
|
|
7
|
+
|
|
8
|
+
// This file exists to provide wrappers around ember-qunit's
|
|
9
|
+
// test setup functions. This way, you can easily extend the setup that is
|
|
10
|
+
// needed per test type.
|
|
11
|
+
|
|
12
|
+
function setupApplicationTest(hooks: NestedHooks, options?: SetupTestOptions) {
|
|
13
|
+
upstreamSetupApplicationTest(hooks, options);
|
|
14
|
+
|
|
15
|
+
// Additional setup for application tests can be done here.
|
|
16
|
+
//
|
|
17
|
+
// For example, if you need an authenticated session for each
|
|
18
|
+
// application test, you could do:
|
|
19
|
+
//
|
|
20
|
+
// hooks.beforeEach(async function () {
|
|
21
|
+
// await authenticateSession(); // ember-simple-auth
|
|
22
|
+
// });
|
|
23
|
+
//
|
|
24
|
+
// This is also a good place to call test setup functions coming
|
|
25
|
+
// from other addons:
|
|
26
|
+
//
|
|
27
|
+
// setupIntl(hooks, 'en-us'); // ember-intl
|
|
28
|
+
// setupMirage(hooks); // ember-cli-mirage
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function setupRenderingTest(hooks: NestedHooks, options?: SetupTestOptions) {
|
|
32
|
+
upstreamSetupRenderingTest(hooks, options);
|
|
33
|
+
|
|
34
|
+
// Additional setup for rendering tests can be done here.
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function setupTest(hooks: NestedHooks, options?: SetupTestOptions) {
|
|
38
|
+
upstreamSetupTest(hooks, options);
|
|
39
|
+
|
|
40
|
+
// Additional setup for unit tests can be done here.
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { setupApplicationTest, setupRenderingTest, setupTest };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title><%= namespace %> Tests</title>
|
|
6
|
+
<meta name="description" content="">
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
8
|
+
|
|
9
|
+
{{content-for "head"}}
|
|
10
|
+
{{content-for "test-head"}}
|
|
11
|
+
|
|
12
|
+
<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
|
|
13
|
+
<link rel="stylesheet" href="{{rootURL}}assets/<%= name %>.css">
|
|
14
|
+
<link rel="stylesheet" href="{{rootURL}}assets/test-support.css">
|
|
15
|
+
|
|
16
|
+
{{content-for "head-footer"}}
|
|
17
|
+
{{content-for "test-head-footer"}}
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
{{content-for "body"}}
|
|
21
|
+
{{content-for "test-body"}}
|
|
22
|
+
|
|
23
|
+
<div id="qunit"></div>
|
|
24
|
+
<div id="qunit-fixture">
|
|
25
|
+
<div id="ember-testing-container">
|
|
26
|
+
<div id="ember-testing"></div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<script src="/testem.js" integrity="" data-embroider-ignore></script>
|
|
31
|
+
<script src="{{rootURL}}assets/vendor.js"></script>
|
|
32
|
+
<script src="{{rootURL}}assets/test-support.js"></script>
|
|
33
|
+
<script src="{{rootURL}}assets/<%= name %>.js"></script>
|
|
34
|
+
<script src="{{rootURL}}assets/tests.js"></script>
|
|
35
|
+
|
|
36
|
+
{{content-for "body-footer"}}
|
|
37
|
+
{{content-for "test-body-footer"}}
|
|
38
|
+
</body>
|
|
39
|
+
</html>
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Application from '<%= modulePrefix %>/app';
|
|
2
|
+
import config from '<%= modulePrefix %>/config/environment';
|
|
3
|
+
import * as QUnit from 'qunit';
|
|
4
|
+
import { setApplication } from '@ember/test-helpers';
|
|
5
|
+
import { setup } from 'qunit-dom';
|
|
6
|
+
import { loadTests } from 'ember-qunit/test-loader';
|
|
7
|
+
import { start, setupEmberOnerrorValidation } from 'ember-qunit';
|
|
8
|
+
|
|
9
|
+
setApplication(Application.create(config.APP));
|
|
10
|
+
|
|
11
|
+
setup(QUnit.assert);
|
|
12
|
+
setupEmberOnerrorValidation();
|
|
13
|
+
loadTests();
|
|
14
|
+
start();
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@tsconfig/ember",
|
|
3
|
+
"glint": {
|
|
4
|
+
"environment": ["ember-loose", "ember-template-imports"]
|
|
5
|
+
},
|
|
6
|
+
"compilerOptions": {
|
|
7
|
+
// The combination of `baseUrl` with `paths` allows Ember's classic package
|
|
8
|
+
// layout, which is not resolvable with the Node resolution algorithm, to
|
|
9
|
+
// work with TypeScript.
|
|
10
|
+
"baseUrl": ".",
|
|
11
|
+
"paths": {
|
|
12
|
+
"<%= name %>/tests/*": ["tests/*"],
|
|
13
|
+
"<%= name %>/*": ["app/*"],
|
|
14
|
+
"*": ["types/*"]
|
|
15
|
+
},
|
|
16
|
+
"types": ["ember-source/types"]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@glint/environment-ember-loose';
|
package/index.js
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const stringUtil = require('ember-cli-string-utils');
|
|
4
|
+
const chalk = require('chalk');
|
|
5
|
+
const { isExperimentEnabled } = require('@ember-tooling/blueprint-model/utilities/experiments');
|
|
6
|
+
const directoryForPackageName = require('@ember-tooling/blueprint-model/utilities/directory-for-package-name');
|
|
7
|
+
const blueprintVersion = require('./package.json').version;
|
|
8
|
+
|
|
9
|
+
module.exports = {
|
|
10
|
+
name: '@ember-tooling/classic-build-app-blueprint',
|
|
11
|
+
description: 'The default blueprint for ember-cli projects.',
|
|
12
|
+
|
|
13
|
+
shouldTransformTypeScript: true,
|
|
14
|
+
|
|
15
|
+
filesToRemove: [
|
|
16
|
+
'app/styles/.gitkeep',
|
|
17
|
+
'app/templates/.gitkeep',
|
|
18
|
+
'app/views/.gitkeep',
|
|
19
|
+
'public/.gitkeep',
|
|
20
|
+
'Brocfile.js',
|
|
21
|
+
'testem.json',
|
|
22
|
+
],
|
|
23
|
+
|
|
24
|
+
locals(options) {
|
|
25
|
+
let entity = options.entity;
|
|
26
|
+
let rawName = entity.name;
|
|
27
|
+
let name = stringUtil.dasherize(rawName);
|
|
28
|
+
let namespace = stringUtil.classify(rawName);
|
|
29
|
+
let embroider = isExperimentEnabled('EMBROIDER') || options.embroider;
|
|
30
|
+
|
|
31
|
+
let hasOptions = !options.welcome || options.packageManager || embroider || options.ciProvider;
|
|
32
|
+
let blueprintOptions = '';
|
|
33
|
+
if (hasOptions) {
|
|
34
|
+
let indent = `\n `;
|
|
35
|
+
let outdent = `\n `;
|
|
36
|
+
|
|
37
|
+
blueprintOptions =
|
|
38
|
+
indent +
|
|
39
|
+
[
|
|
40
|
+
!options.welcome && '"--no-welcome"',
|
|
41
|
+
options.packageManager === 'yarn' && '"--yarn"',
|
|
42
|
+
options.packageManager === 'pnpm' && '"--pnpm"',
|
|
43
|
+
embroider && '"--embroider"',
|
|
44
|
+
options.ciProvider && `"--ci-provider=${options.ciProvider}"`,
|
|
45
|
+
options.typescript && `"--typescript"`,
|
|
46
|
+
!options.emberData && `"--no-ember-data"`,
|
|
47
|
+
]
|
|
48
|
+
.filter(Boolean)
|
|
49
|
+
.join(',\n ') +
|
|
50
|
+
outdent;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
let invokeScriptPrefix = 'npm run';
|
|
54
|
+
let execBinPrefix = 'npm exec';
|
|
55
|
+
|
|
56
|
+
if (options.packageManager === 'yarn') {
|
|
57
|
+
invokeScriptPrefix = 'yarn';
|
|
58
|
+
execBinPrefix = 'yarn';
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (options.packageManager === 'pnpm') {
|
|
62
|
+
invokeScriptPrefix = 'pnpm';
|
|
63
|
+
execBinPrefix = 'pnpm';
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
appDirectory: directoryForPackageName(name),
|
|
68
|
+
name,
|
|
69
|
+
modulePrefix: name,
|
|
70
|
+
namespace,
|
|
71
|
+
blueprintVersion,
|
|
72
|
+
yarn: options.packageManager === 'yarn',
|
|
73
|
+
pnpm: options.packageManager === 'pnpm',
|
|
74
|
+
npm: options.packageManager !== 'yarn' && options.packageManager !== 'pnpm',
|
|
75
|
+
invokeScriptPrefix,
|
|
76
|
+
execBinPrefix,
|
|
77
|
+
welcome: options.welcome,
|
|
78
|
+
blueprint: 'app',
|
|
79
|
+
blueprintOptions,
|
|
80
|
+
embroider,
|
|
81
|
+
lang: options.lang,
|
|
82
|
+
emberData: options.emberData,
|
|
83
|
+
ciProvider: options.ciProvider,
|
|
84
|
+
typescript: options.typescript,
|
|
85
|
+
strict: options.strict,
|
|
86
|
+
packageManager: options.packageManager ?? 'npm',
|
|
87
|
+
};
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
files(options) {
|
|
91
|
+
if (this._files) {
|
|
92
|
+
return this._files;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
let files = this._super();
|
|
96
|
+
|
|
97
|
+
if (options.ciProvider !== 'github') {
|
|
98
|
+
files = files.filter((file) => file.indexOf('.github') < 0);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (!options.typescript) {
|
|
102
|
+
files = files.filter(
|
|
103
|
+
(file) => !['tsconfig.json', 'app/config/', 'types/'].includes(file) && !file.endsWith('.d.ts')
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (!options.emberData) {
|
|
108
|
+
files = files.filter((file) => !file.includes('models/'));
|
|
109
|
+
files = files.filter((file) => !file.includes('ember-data/'));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (options.strict) {
|
|
113
|
+
files = files.filter((file) => !file.endsWith('.hbs'));
|
|
114
|
+
} else {
|
|
115
|
+
files = files.filter((file) => !file.endsWith('.gjs') && !file.endsWith('.gts'));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
this._files = files;
|
|
119
|
+
|
|
120
|
+
return this._files;
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
beforeInstall() {
|
|
124
|
+
const prependEmoji = require('@ember-tooling/blueprint-model/utilities/prepend-emoji');
|
|
125
|
+
this.ui.writeLine(chalk.blue(`@ember-tooling/classic-build-app-blueprint v${blueprintVersion}`));
|
|
126
|
+
this.ui.writeLine('');
|
|
127
|
+
this.ui.writeLine(prependEmoji('✨', `Creating a new Ember app in ${chalk.yellow(process.cwd())}:`));
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @override
|
|
132
|
+
*
|
|
133
|
+
* This modification of buildFileInfo allows our differing
|
|
134
|
+
* input files to output to a single file, depending on the options.
|
|
135
|
+
* For example:
|
|
136
|
+
*
|
|
137
|
+
* for javascript,
|
|
138
|
+
* _ts_eslint.config.mjs is deleted
|
|
139
|
+
* _js_eslint.config.mjs is renamed to eslint.config.mjs
|
|
140
|
+
*
|
|
141
|
+
* for typescript,
|
|
142
|
+
* _js_eslint.config.mjs is deleted
|
|
143
|
+
* _ts_eslint.config.mjs is renamed to eslint.config.mjs
|
|
144
|
+
*/
|
|
145
|
+
buildFileInfo(intoDir, templateVariables, file, options) {
|
|
146
|
+
let fileInfo = this._super.buildFileInfo.apply(this, arguments);
|
|
147
|
+
|
|
148
|
+
if (file.includes('_js_')) {
|
|
149
|
+
if (options.typescript) {
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
fileInfo.outputBasePath = fileInfo.outputPath.replace('_js_', '');
|
|
154
|
+
fileInfo.outputPath = fileInfo.outputPath.replace('_js_', '');
|
|
155
|
+
fileInfo.displayPath = fileInfo.outputPath.replace('_js_', '');
|
|
156
|
+
return fileInfo;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (file.includes('_ts_')) {
|
|
160
|
+
if (!options.typescript) {
|
|
161
|
+
return null;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
fileInfo.outputBasePath = fileInfo.outputPath.replace('_ts_', '');
|
|
165
|
+
fileInfo.outputPath = fileInfo.outputPath.replace('_ts_', '');
|
|
166
|
+
fileInfo.displayPath = fileInfo.outputPath.replace('_ts_', '');
|
|
167
|
+
return fileInfo;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return fileInfo;
|
|
171
|
+
},
|
|
172
|
+
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-tooling/classic-build-app-blueprint",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
3
|
+
"version": "6.7.0-alpha.4",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/ember-cli/ember-cli.git",
|
|
7
|
+
"directory": "packages/app-blueprint"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"chalk": "^4.1.2",
|
|
11
|
+
"ember-cli-string-utils": "^1.1.0",
|
|
12
|
+
"@ember-tooling/blueprint-model": "0.0.2"
|
|
13
|
+
},
|
|
14
|
+
"release-plan": {
|
|
15
|
+
"semverIncrementAs": {
|
|
16
|
+
"minor": "prerelease",
|
|
17
|
+
"patch": "prerelease"
|
|
18
|
+
},
|
|
19
|
+
"semverIncrementTag": "alpha",
|
|
20
|
+
"publishTag": "alpha"
|
|
21
|
+
}
|
|
22
|
+
}
|