@ember/app-blueprint 0.0.0 → 0.1.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.
Files changed (89) hide show
  1. package/.editorconfig +19 -0
  2. package/.github/workflows/ci.yml +35 -0
  3. package/.github/workflows/plan-release.yml +94 -0
  4. package/.github/workflows/publish.yml +43 -0
  5. package/.prettierrc.cjs +13 -0
  6. package/.release-plan.json +22 -0
  7. package/CHANGELOG.md +17 -0
  8. package/RELEASE.md +27 -0
  9. package/eslint.config.mjs +30 -0
  10. package/files/.editorconfig +19 -0
  11. package/files/.ember-cli +7 -0
  12. package/files/.github/workflows/ci.yml +53 -0
  13. package/files/.prettierignore +13 -0
  14. package/files/.prettierrc.js +39 -0
  15. package/files/.stylelintignore +5 -0
  16. package/files/.stylelintrc.js +5 -0
  17. package/files/.template-lintrc.js +5 -0
  18. package/files/.watchmanconfig +3 -0
  19. package/files/README.md +58 -0
  20. package/files/_js_babel.config.cjs +42 -0
  21. package/files/_js_eslint.config.mjs +115 -0
  22. package/files/_ts_babel.config.cjs +50 -0
  23. package/files/_ts_eslint.config.mjs +135 -0
  24. package/files/app/app.ts +18 -0
  25. package/files/app/components/.gitkeep +0 -0
  26. package/files/app/config/environment.ts +17 -0
  27. package/files/app/controllers/.gitkeep +0 -0
  28. package/files/app/deprecation-workflow.ts +24 -0
  29. package/files/app/helpers/.gitkeep +0 -0
  30. package/files/app/models/.gitkeep +0 -0
  31. package/files/app/router.ts +11 -0
  32. package/files/app/routes/.gitkeep +0 -0
  33. package/files/app/styles/app.css +1 -0
  34. package/files/app/templates/_js_application.hbs +10 -0
  35. package/files/app/templates/_ts_application.gts +15 -0
  36. package/files/config/ember-cli-update.json +16 -0
  37. package/files/config/environment.js +48 -0
  38. package/files/config/optional-features.json +7 -0
  39. package/files/config/targets.js +11 -0
  40. package/files/ember-cli-build.js +22 -0
  41. package/files/gitignore +26 -0
  42. package/files/index.html +29 -0
  43. package/files/package.json +112 -0
  44. package/files/public/robots.txt +3 -0
  45. package/files/testem.js +25 -0
  46. package/files/tests/helpers/index.ts +43 -0
  47. package/files/tests/index.html +43 -0
  48. package/files/tests/integration/.gitkeep +0 -0
  49. package/files/tests/test-helper.ts +15 -0
  50. package/files/tests/unit/.gitkeep +0 -0
  51. package/files/tsconfig.json +31 -0
  52. package/files/vite.config.mjs +15 -0
  53. package/index.js +158 -0
  54. package/lib/directory-for-package-name.js +31 -0
  55. package/lib/prepend-emoji.js +12 -0
  56. package/package.json +33 -6
  57. package/tests/default.test.mjs +145 -0
  58. package/tests/fixture/app/components/custom-component.hbs +3 -0
  59. package/tests/fixture/app/initializers/test-init.js +6 -0
  60. package/tests/fixture/app/instance-initializers/test-instance-init.js +6 -0
  61. package/tests/fixture/app/router.js +12 -0
  62. package/tests/fixture/app/routes/styles.js +6 -0
  63. package/tests/fixture/app/styles/app.css +5 -0
  64. package/tests/fixture/app/templates/application.hbs +3 -0
  65. package/tests/fixture/app/templates/custom-component.hbs +1 -0
  66. package/tests/fixture/app/templates/index.hbs +1 -0
  67. package/tests/fixture/app/templates/styles.hbs +5 -0
  68. package/tests/fixture/testem-proxy.js +35 -0
  69. package/tests/fixture/tests/acceptance/app-init-test.js +13 -0
  70. package/tests/fixture/tests/acceptance/custom-component-test.js +14 -0
  71. package/tests/fixture/tests/acceptance/styles-test.js +18 -0
  72. package/tests/fixture/tests/acceptance/welcome-page-test.js +14 -0
  73. package/tests/fixture-ts/app/initializers/test-init.ts +10 -0
  74. package/tests/fixture-ts/app/instance-initializers/test-instance-init.ts +10 -0
  75. package/tests/fixture-ts/app/router.ts +12 -0
  76. package/tests/fixture-ts/app/routes/styles.ts +8 -0
  77. package/tests/fixture-ts/app/styles/app.css +5 -0
  78. package/tests/fixture-ts/app/templates/components/custom.gts +5 -0
  79. package/tests/fixture-ts/app/templates/custom-component.gts +5 -0
  80. package/tests/fixture-ts/app/templates/index.gts +5 -0
  81. package/tests/fixture-ts/app/templates/styles.gts +7 -0
  82. package/tests/fixture-ts/testem-proxy.js +36 -0
  83. package/tests/fixture-ts/tests/acceptance/app-init-test.ts +22 -0
  84. package/tests/fixture-ts/tests/acceptance/custom-component-test.ts +14 -0
  85. package/tests/fixture-ts/tests/acceptance/styles-test.ts +18 -0
  86. package/tests/fixture-ts/tests/acceptance/welcome-page-test.ts +14 -0
  87. package/tests/helpers.mjs +57 -0
  88. package/tests/typescript.test.mjs +24 -0
  89. package/vitest.config.ts +10 -0
package/.editorconfig ADDED
@@ -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
@@ -0,0 +1,35 @@
1
+ name: CI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ pull_request:
6
+ push:
7
+ branches:
8
+ - main
9
+
10
+ jobs:
11
+ lint:
12
+ name: Lint
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: pnpm/action-setup@v4
17
+ - uses: actions/setup-node@v4
18
+ with:
19
+ node-version: 18
20
+ cache: pnpm
21
+ - run: pnpm install --frozen-lockfile
22
+ - run: pnpm lint
23
+
24
+ test:
25
+ name: Test
26
+ runs-on: ubuntu-latest
27
+ steps:
28
+ - uses: actions/checkout@v4
29
+ - uses: pnpm/action-setup@v4
30
+ - uses: actions/setup-node@v4
31
+ with:
32
+ node-version: 18
33
+ cache: pnpm
34
+ - run: pnpm install --frozen-lockfile
35
+ - run: pnpm test
@@ -0,0 +1,94 @@
1
+ name: Plan Release
2
+ on:
3
+ workflow_dispatch:
4
+ push:
5
+ branches:
6
+ - main
7
+ - master
8
+ pull_request_target: # This workflow has permissions on the repo, do NOT run code from PRs in this workflow. See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
9
+ types:
10
+ - labeled
11
+ - unlabeled
12
+
13
+ concurrency:
14
+ group: plan-release # only the latest one of these should ever be running
15
+ cancel-in-progress: true
16
+
17
+ jobs:
18
+ is-this-a-release:
19
+ name: "Is this a release?"
20
+ runs-on: ubuntu-latest
21
+ outputs:
22
+ command: ${{ steps.check-release.outputs.command }}
23
+
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ with:
27
+ fetch-depth: 2
28
+ ref: 'main'
29
+ # This will only cause the `is-this-a-release` job to have a "command" of `release`
30
+ # when the .release-plan.json file was changed on the last commit.
31
+ - id: check-release
32
+ run: if git diff --name-only HEAD HEAD~1 | grep -w -q ".release-plan.json"; then echo "command=release"; fi >> $GITHUB_OUTPUT
33
+
34
+ create-prepare-release-pr:
35
+ name: Create Prepare Release PR
36
+ runs-on: ubuntu-latest
37
+ timeout-minutes: 5
38
+ needs: is-this-a-release
39
+ permissions:
40
+ contents: write
41
+ issues: read
42
+ pull-requests: write
43
+ # only run on push event or workflow dispatch if plan wasn't updated (don't create a release plan when we're releasing)
44
+ # only run on labeled event if the PR has already been merged
45
+ if: ((github.event_name == 'push' || github.event_name == 'workflow_dispatch') && needs.is-this-a-release.outputs.command != 'release') || (github.event_name == 'pull_request_target' && github.event.pull_request.merged == true)
46
+
47
+ steps:
48
+ - uses: actions/checkout@v4
49
+ # We need to download lots of history so that
50
+ # github-changelog can discover what's changed since the last release
51
+ with:
52
+ fetch-depth: 0
53
+ ref: 'main'
54
+ - uses: pnpm/action-setup@v4
55
+ - uses: actions/setup-node@v4
56
+ with:
57
+ node-version: 18
58
+ cache: pnpm
59
+ - run: pnpm install --frozen-lockfile
60
+ - name: "Generate Explanation and Prep Changelogs"
61
+ id: explanation
62
+ run: |
63
+ set +e
64
+ pnpm release-plan prepare 2> >(tee -a release-plan-stderr.txt >&2)
65
+
66
+ if [ $? -ne 0 ]; then
67
+ release_plan_output=$(cat release-plan-stderr.txt)
68
+ else
69
+ release_plan_output=$(jq .description .release-plan.json -r)
70
+ rm release-plan-stderr.txt
71
+
72
+ if [ $(jq '.solution | length' .release-plan.json) -eq 1 ]; then
73
+ new_version=$(jq -r '.solution[].newVersion' .release-plan.json)
74
+ echo "new_version=v$new_version" >> $GITHUB_OUTPUT
75
+ fi
76
+ fi
77
+ echo 'text<<EOF' >> $GITHUB_OUTPUT
78
+ echo "$release_plan_output" >> $GITHUB_OUTPUT
79
+ echo 'EOF' >> $GITHUB_OUTPUT
80
+ env:
81
+ GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
82
+
83
+ - uses: peter-evans/create-pull-request@v7
84
+ with:
85
+ commit-message: "Prepare Release ${{ steps.explanation.outputs.new_version}} using 'release-plan'"
86
+ labels: "internal"
87
+ branch: release-preview
88
+ title: Prepare Release ${{ steps.explanation.outputs.new_version }}
89
+ body: |
90
+ This PR is a preview of the release that [release-plan](https://github.com/embroider-build/release-plan) has prepared. To release you should just merge this PR 👍
91
+
92
+ -----------------------------------------
93
+
94
+ ${{ steps.explanation.outputs.text }}
@@ -0,0 +1,43 @@
1
+ # For every push to the primary branch with .release-plan.json modified,
2
+ # runs release-plan.
3
+
4
+ name: Publish Stable
5
+
6
+ on:
7
+ workflow_dispatch:
8
+ push:
9
+ branches:
10
+ - main
11
+ - master
12
+ paths:
13
+ - '.release-plan.json'
14
+
15
+ concurrency:
16
+ group: publish-${{ github.head_ref || github.ref }}
17
+ cancel-in-progress: true
18
+
19
+ jobs:
20
+ publish:
21
+ name: "NPM Publish"
22
+ runs-on: ubuntu-latest
23
+ permissions:
24
+ contents: write
25
+ pull-requests: write
26
+ id-token: write
27
+ attestations: write
28
+
29
+ steps:
30
+ - uses: actions/checkout@v4
31
+ - uses: pnpm/action-setup@v4
32
+ - uses: actions/setup-node@v4
33
+ with:
34
+ node-version: 18
35
+ # This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
36
+ registry-url: 'https://registry.npmjs.org'
37
+ cache: pnpm
38
+ - run: pnpm install --frozen-lockfile
39
+ - name: Publish to NPM
40
+ run: NPM_CONFIG_PROVENANCE=true pnpm release-plan publish
41
+ env:
42
+ GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
43
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ singleQuote: true,
5
+ overrides: [
6
+ {
7
+ files: ['*.js', '*.ts', '*.cjs', '.mjs', '.cts', '.mts', '.cts'],
8
+ options: {
9
+ singleQuote: true,
10
+ },
11
+ },
12
+ ],
13
+ };
@@ -0,0 +1,22 @@
1
+ {
2
+ "solution": {
3
+ "@ember/app-blueprint": {
4
+ "impact": "minor",
5
+ "oldVersion": "0.0.0",
6
+ "newVersion": "0.1.0",
7
+ "tagName": "latest",
8
+ "constraints": [
9
+ {
10
+ "impact": "minor",
11
+ "reason": "Appears in changelog section :rocket: Enhancement"
12
+ },
13
+ {
14
+ "impact": "patch",
15
+ "reason": "Appears in changelog section :house: Internal"
16
+ }
17
+ ],
18
+ "pkgJSONPath": "./package.json"
19
+ }
20
+ },
21
+ "description": "## Release (2025-04-25)\n\n* @ember/app-blueprint 0.1.0 (minor)\n\n#### :rocket: Enhancement\n* `@ember/app-blueprint`\n * [#3](https://github.com/ember-cli/ember-app-blueprint/pull/3) Import the app blueprint from ember-cli and @embroider/app-blueprint ([@mansona](https://github.com/mansona))\n\n#### :house: Internal\n* `@ember/app-blueprint`\n * [#6](https://github.com/ember-cli/ember-app-blueprint/pull/6) fix repo url ([@mansona](https://github.com/mansona))\n * [#4](https://github.com/ember-cli/ember-app-blueprint/pull/4) set up release plan ([@mansona](https://github.com/mansona))\n\n#### Committers: 1\n- Chris Manson ([@mansona](https://github.com/mansona))\n"
22
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # Changelog
2
+
3
+ ## Release (2025-04-25)
4
+
5
+ * @ember/app-blueprint 0.1.0 (minor)
6
+
7
+ #### :rocket: Enhancement
8
+ * `@ember/app-blueprint`
9
+ * [#3](https://github.com/ember-cli/ember-app-blueprint/pull/3) Import the app blueprint from ember-cli and @embroider/app-blueprint ([@mansona](https://github.com/mansona))
10
+
11
+ #### :house: Internal
12
+ * `@ember/app-blueprint`
13
+ * [#6](https://github.com/ember-cli/ember-app-blueprint/pull/6) fix repo url ([@mansona](https://github.com/mansona))
14
+ * [#4](https://github.com/ember-cli/ember-app-blueprint/pull/4) set up release plan ([@mansona](https://github.com/mansona))
15
+
16
+ #### Committers: 1
17
+ - Chris Manson ([@mansona](https://github.com/mansona))
package/RELEASE.md ADDED
@@ -0,0 +1,27 @@
1
+ # Release Process
2
+
3
+ Releases in this repo are mostly automated using [release-plan](https://github.com/embroider-build/release-plan/). Once you label all your PRs correctly (see below) you will have an automatically generated PR that updates your CHANGELOG.md file and a `.release-plan.json` that is used to prepare the release once the PR is merged.
4
+
5
+ ## Preparation
6
+
7
+ Since the majority of the actual release process is automated, the remaining tasks before releasing are:
8
+
9
+ - correctly labeling **all** pull requests that have been merged since the last release
10
+ - updating pull request titles so they make sense to our users
11
+
12
+ Some great information on why this is important can be found at [keepachangelog.com](https://keepachangelog.com/en/1.1.0/), but the overall
13
+ guiding principle here is that changelogs are for humans, not machines.
14
+
15
+ When reviewing merged PR's the labels to be used are:
16
+
17
+ - breaking - Used when the PR is considered a breaking change.
18
+ - enhancement - Used when the PR adds a new feature or enhancement.
19
+ - bug - Used when the PR fixes a bug included in a previous release.
20
+ - documentation - Used when the PR adds or updates documentation.
21
+ - internal - Internal changes or things that don't fit in any other category.
22
+
23
+ **Note:** `release-plan` requires that **all** PRs are labeled. If a PR doesn't fit in a category it's fine to label it as `internal`
24
+
25
+ ## Release
26
+
27
+ Once the prep work is completed, the actual release is straight forward: you just need to merge the open [Plan Release](https://github.com/ember-cli/ember-app-blueprint/pulls?q=is%3Apr+is%3Aopen+%22Prepare+Release%22+in%3Atitle) PR
@@ -0,0 +1,30 @@
1
+ import globals from 'globals';
2
+ import pluginJs from '@eslint/js';
3
+ import eslintConfigPrettier from 'eslint-config-prettier';
4
+
5
+ export default [
6
+ {
7
+ files: ['**/*.js'],
8
+ languageOptions: { sourceType: 'commonjs' },
9
+ },
10
+ {
11
+ files: [
12
+ 'files/*/app/**/*.js',
13
+ 'files-override/**/*.mjs',
14
+ 'files-override/*/app/**/*.js',
15
+ 'files-override/*/tests/**/*.js',
16
+ ],
17
+ languageOptions: {
18
+ sourceType: 'module',
19
+ globals: {
20
+ ...globals.browser,
21
+ },
22
+ },
23
+ },
24
+ { languageOptions: { globals: globals.node } },
25
+ pluginJs.configs.recommended,
26
+ eslintConfigPrettier,
27
+ {
28
+ ignores: ['tests/fixture/*', 'tests/fixture-ts/*', 'files/ember-cli-build.js'],
29
+ },
30
+ ];
@@ -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
@@ -0,0 +1,7 @@
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
+ }
@@ -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
@@ -0,0 +1,13 @@
1
+ # unconventional js
2
+ /blueprints/*/files/
3
+
4
+ # compiled output
5
+ /dist/
6
+
7
+ # misc
8
+ /coverage/
9
+ !.*
10
+ .*/
11
+ /pnpm-lock.yaml
12
+ ember-cli-update.json
13
+ *.html
@@ -0,0 +1,39 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ plugins: ['prettier-plugin-ember-template-tag'],
5
+ singleQuote: true,
6
+ overrides: [
7
+ {
8
+ files: ['*.js', '*.ts', '*.cjs', '.mjs', '.cts', '.mts', '.cts'],
9
+ options: {
10
+ trailingComma: 'es5',
11
+ },
12
+ },
13
+ {
14
+ files: ['*.html'],
15
+ options: {
16
+ singleQuote: false,
17
+ },
18
+ },
19
+ {
20
+ files: ['*.json'],
21
+ options: {
22
+ singleQuote: false,
23
+ },
24
+ },
25
+ {
26
+ files: ['*.hbs'],
27
+ options: {
28
+ singleQuote: false,
29
+ },
30
+ },
31
+ {
32
+ files: ['*.gjs', '*.gts'],
33
+ options: {
34
+ templateSingleQuote: false,
35
+ trailingComma: 'es5',
36
+ },
37
+ },
38
+ ],
39
+ };
@@ -0,0 +1,5 @@
1
+ # unconventional files
2
+ /blueprints/*/files/
3
+
4
+ # compiled output
5
+ /dist/
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ extends: ['stylelint-config-standard'],
5
+ };
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ extends: 'recommended',
5
+ };
@@ -0,0 +1,3 @@
1
+ {
2
+ "ignore_dirs": ["dist"]
3
+ }
@@ -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,42 @@
1
+ const {
2
+ babelCompatSupport,
3
+ templateCompatSupport,
4
+ } = require('@embroider/compat/babel');
5
+
6
+ module.exports = {
7
+ plugins: [
8
+ [
9
+ 'babel-plugin-ember-template-compilation',
10
+ {
11
+ compilerPath: 'ember-source/dist/ember-template-compiler.js',
12
+ enableLegacyModules: [
13
+ 'ember-cli-htmlbars',
14
+ 'ember-cli-htmlbars-inline-precompile',
15
+ 'htmlbars-inline-precompile',
16
+ ],
17
+ transforms: [...templateCompatSupport()],
18
+ },
19
+ ],
20
+ [
21
+ 'module:decorator-transforms',
22
+ {
23
+ runtime: {
24
+ import: require.resolve('decorator-transforms/runtime-esm'),
25
+ },
26
+ },
27
+ ],
28
+ [
29
+ '@babel/plugin-transform-runtime',
30
+ {
31
+ absoluteRuntime: __dirname,
32
+ useESModules: true,
33
+ regenerator: false,
34
+ },
35
+ ],
36
+ ...babelCompatSupport(),
37
+ ],
38
+
39
+ generatorOpts: {
40
+ compact: false,
41
+ },
42
+ };
@@ -0,0 +1,115 @@
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
+ };
29
+
30
+ export default [
31
+ js.configs.recommended,
32
+ eslintConfigPrettier,
33
+ ember.configs.base,
34
+ ember.configs.gjs,
35
+ /**
36
+ * Ignores must be in their own object
37
+ * https://eslint.org/docs/latest/use/configure/ignore
38
+ */
39
+ {
40
+ ignores: ['dist/', 'node_modules/', 'coverage/', '!**/.*'],
41
+ },
42
+ /**
43
+ * https://eslint.org/docs/latest/use/configure/configuration-files#configuring-linter-options
44
+ */
45
+ {
46
+ linterOptions: {
47
+ reportUnusedDisableDirectives: 'error',
48
+ },
49
+ },
50
+ {
51
+ files: ['**/*.js'],
52
+ languageOptions: {
53
+ parser: babelParser,
54
+ },
55
+ },
56
+ {
57
+ files: ['**/*.{js,gjs}'],
58
+ languageOptions: {
59
+ parserOptions: esmParserOptions,
60
+ globals: {
61
+ ...globals.browser,
62
+ },
63
+ },
64
+ },
65
+ {
66
+ files: ['tests/**/*-test.{js,gjs}'],
67
+ plugins: {
68
+ qunit,
69
+ },
70
+ },
71
+ /**
72
+ * CJS node files
73
+ */
74
+ {
75
+ files: [
76
+ '**/*.cjs',
77
+ 'config/**/*.js',
78
+ 'testem.js',
79
+ 'testem*.js',
80
+ '.prettierrc.js',
81
+ '.stylelintrc.js',
82
+ '.template-lintrc.js',
83
+ 'ember-cli-build.js',
84
+ ],
85
+ plugins: {
86
+ n,
87
+ },
88
+
89
+ languageOptions: {
90
+ sourceType: 'script',
91
+ ecmaVersion: 'latest',
92
+ globals: {
93
+ ...globals.node,
94
+ },
95
+ },
96
+ },
97
+ /**
98
+ * ESM node files
99
+ */
100
+ {
101
+ files: ['**/*.mjs'],
102
+ plugins: {
103
+ n,
104
+ },
105
+
106
+ languageOptions: {
107
+ sourceType: 'module',
108
+ ecmaVersion: 'latest',
109
+ parserOptions: esmParserOptions,
110
+ globals: {
111
+ ...globals.node,
112
+ },
113
+ },
114
+ },
115
+ ];