ember.nvp 0.0.0 → 0.2.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 (92) hide show
  1. package/.github/workflows/ci.yml +41 -0
  2. package/.github/workflows/plan-release.yml +61 -0
  3. package/.github/workflows/publish.yml +41 -0
  4. package/.nvmrc +1 -0
  5. package/.prettierignore +3 -0
  6. package/.prettierrc.js +10 -0
  7. package/.release-plan.json +30 -0
  8. package/CHANGELOG.md +54 -0
  9. package/README.md +159 -1
  10. package/RELEASE.md +27 -0
  11. package/package.json +51 -3
  12. package/pnpm-workspace.yaml +3 -0
  13. package/src/bases/README.md +5 -0
  14. package/src/bases/minimal-app/app.test.ts +203 -0
  15. package/src/bases/minimal-app/files/.env.development +8 -0
  16. package/src/bases/minimal-app/files/app/app.ts +21 -0
  17. package/src/bases/minimal-app/files/app/config.ts +30 -0
  18. package/src/bases/minimal-app/files/app/router.ts +51 -0
  19. package/src/bases/minimal-app/files/app/templates/application.gts +5 -0
  20. package/src/bases/minimal-app/files/babel.config.js +43 -0
  21. package/src/bases/minimal-app/files/index.html +17 -0
  22. package/src/bases/minimal-app/files/package.json +57 -0
  23. package/src/bases/minimal-app/files/tsconfig.json +12 -0
  24. package/src/bases/minimal-app/files/vite.config.mjs +13 -0
  25. package/src/bases/minimal-app/index.js +111 -0
  26. package/src/bases/minimal-library/index.js +10 -0
  27. package/src/cli/args.js +57 -0
  28. package/src/cli/generator.js +74 -0
  29. package/src/cli/index.js +79 -0
  30. package/src/cli/questions/layers.js +64 -0
  31. package/src/cli/questions/name.js +38 -0
  32. package/src/cli/questions/ok.js +38 -0
  33. package/src/cli/questions/package-manager.js +42 -0
  34. package/src/cli/questions/path.js +59 -0
  35. package/src/cli/questions/project-type.js +55 -0
  36. package/src/consolidators/linting.js +51 -0
  37. package/src/index.js +2 -0
  38. package/src/layers/eslint-bundled-ember/files/eslint.config.js +14 -0
  39. package/src/layers/eslint-bundled-ember/index.js +91 -0
  40. package/src/layers/eslint-bundled-nvp/app.test.ts +91 -0
  41. package/src/layers/eslint-bundled-nvp/files/eslint.config.js +16 -0
  42. package/src/layers/eslint-bundled-nvp/index.js +91 -0
  43. package/src/layers/eslint-ejected/files/eslint.config.js +37 -0
  44. package/src/layers/eslint-ejected/index.js +95 -0
  45. package/src/layers/git/index.js +33 -0
  46. package/src/layers/github-actions/app.test.ts +73 -0
  47. package/src/layers/github-actions/index.js +200 -0
  48. package/src/layers/index.js +47 -0
  49. package/src/layers/prettier/files/.prettierignore +18 -0
  50. package/src/layers/prettier/files/.prettierrc.js +4 -0
  51. package/src/layers/prettier/index.js +65 -0
  52. package/src/layers/qunit/app.test.ts +90 -0
  53. package/src/layers/qunit/files/run-tests.mjs +30 -0
  54. package/src/layers/qunit/files/testem.cjs +26 -0
  55. package/src/layers/qunit/files/tests/index.html +30 -0
  56. package/src/layers/qunit/files/tests/test-helper.ts +66 -0
  57. package/src/layers/qunit/files/tests/unit/.gitkeep +0 -0
  58. package/src/layers/qunit/index.js +102 -0
  59. package/src/layers/release-plan/index.js +5 -0
  60. package/src/layers/renovate/files/app.json5 +14 -0
  61. package/src/layers/renovate/files/library.json5 +16 -0
  62. package/src/layers/renovate/index.js +68 -0
  63. package/src/layers/typescript/app.test.ts +93 -0
  64. package/src/layers/typescript/index.js +145 -0
  65. package/src/layers/vitest/files/tests/integration/.gitkeep +0 -0
  66. package/src/layers/vitest/files/tests/test-helper.ts +5 -0
  67. package/src/layers/vitest/files/tests/unit/.gitkeep +0 -0
  68. package/src/layers/vitest/files/vitest.config.mjs +18 -0
  69. package/src/layers/vitest/index.js +66 -0
  70. package/src/utils/babel.js +76 -0
  71. package/src/utils/buffer.js +15 -0
  72. package/src/utils/cli.js +45 -0
  73. package/src/utils/cwd.js +1 -0
  74. package/src/utils/fs.js +85 -0
  75. package/src/utils/git.js +41 -0
  76. package/src/utils/git.test.ts +36 -0
  77. package/src/utils/manifest.js +9 -0
  78. package/src/utils/npm.js +29 -0
  79. package/src/utils/object.js +10 -0
  80. package/src/utils/project.js +249 -0
  81. package/src/utils/remove-types.js +90 -0
  82. package/src/utils/types.ts +48 -0
  83. package/test/ember.nvp/cli.test.ts +12 -0
  84. package/test/ember.nvp/layers.test.ts +35 -0
  85. package/test/ember.nvp/permutations.test.ts +200 -0
  86. package/test/manual.sh +11 -0
  87. package/test/test-helpers/permutate.test.ts +70 -0
  88. package/test/test-helpers.ts +175 -0
  89. package/tsconfig.json +15 -0
  90. package/vitest.config.js +9 -0
  91. /package/src/layers/{eslint/index.js → qunit/files/tests/application/.gitkeep} +0 -0
  92. /package/src/layers/{minimal/index.js → qunit/files/tests/rendering/.gitkeep} +0 -0
@@ -0,0 +1,41 @@
1
+ name: CI
2
+ on:
3
+ workflow_dispatch:
4
+ pull_request:
5
+ push:
6
+ branches: [main]
7
+
8
+ ##############################################################
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: true
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ env:
18
+ HOME: /tmp/home
19
+ WORKSPACE: /tmp/workspace
20
+
21
+ jobs:
22
+ lints:
23
+ name: "Lint"
24
+ runs-on: ubuntu-latest
25
+ timeout-minutes: 10
26
+
27
+ steps:
28
+ - uses: wyvox/action@v1
29
+ - run: pnpm lint
30
+
31
+ node_tests:
32
+ name: "Node Tests"
33
+ runs-on: ubuntu-latest
34
+ timeout-minutes: 15
35
+
36
+ steps:
37
+ - uses: wyvox/action@v1
38
+ - run: |
39
+ git config --global user.name "ci"
40
+ git config --global user.email "non@none.none"
41
+ pnpm test:node
@@ -0,0 +1,61 @@
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
+ should-run-release-plan-prepare:
19
+ name: Should we run release-plan prepare?
20
+ runs-on: ubuntu-latest
21
+ outputs:
22
+ should-prepare: ${{ steps.should-prepare.outputs.should-prepare }}
23
+ steps:
24
+ - uses: release-plan/actions/should-prepare-release@v1
25
+ with:
26
+ ref: "main"
27
+ id: should-prepare
28
+
29
+ create-prepare-release-pr:
30
+ name: Create Prepare Release PR
31
+ runs-on: ubuntu-latest
32
+ timeout-minutes: 5
33
+ needs: should-run-release-plan-prepare
34
+ permissions:
35
+ contents: write
36
+ issues: read
37
+ pull-requests: write
38
+ if: needs.should-run-release-plan-prepare.outputs.should-prepare == 'true'
39
+ steps:
40
+ - uses: release-plan/actions/prepare@v1
41
+ name: Run release-plan prepare
42
+ with:
43
+ ref: "main"
44
+ env:
45
+ GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
46
+ id: explanation
47
+
48
+ - uses: peter-evans/create-pull-request@v8
49
+ name: Create Prepare Release PR
50
+ with:
51
+ commit-message: "Prepare Release ${{ steps.explanation.outputs.new-version}} using 'release-plan'"
52
+ labels: "internal"
53
+ sign-commits: true
54
+ branch: release-preview
55
+ title: Prepare Release ${{ steps.explanation.outputs.new-version }}
56
+ body: |
57
+ 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 👍
58
+
59
+ -----------------------------------------
60
+
61
+ ${{ steps.explanation.outputs.text }}
@@ -0,0 +1,41 @@
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
+ id-token: write
26
+ attestations: write
27
+
28
+ steps:
29
+ - uses: actions/checkout@v6
30
+ - uses: pnpm/action-setup@v4
31
+ - uses: actions/setup-node@v6
32
+ with:
33
+ node-version: 22
34
+ registry-url: "https://registry.npmjs.org"
35
+ cache: pnpm
36
+ - run: npm install -g npm@latest # ensure that the globally installed npm is new enough to support OIDC
37
+ - run: pnpm install --frozen-lockfile
38
+ - name: Publish to NPM
39
+ run: NPM_CONFIG_PROVENANCE=true pnpm release-plan publish
40
+ env:
41
+ GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ 24
@@ -0,0 +1,3 @@
1
+ pnpm-lock.yaml
2
+ CHANGELOG.md
3
+ dist
package/.prettierrc.js ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @see https://prettier.io/docs/configuration
3
+ * @type {import("prettier").Config}
4
+ */
5
+ const config = {
6
+ printWidth: 100,
7
+ plugins: ["prettier-plugin-ember-template-tag"],
8
+ };
9
+
10
+ export default config;
@@ -0,0 +1,30 @@
1
+ {
2
+ "solution": {
3
+ "ember.nvp": {
4
+ "impact": "minor",
5
+ "oldVersion": "0.1.0",
6
+ "newVersion": "0.2.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 :bug: Bug Fix"
16
+ },
17
+ {
18
+ "impact": "patch",
19
+ "reason": "Appears in changelog section :memo: Documentation"
20
+ },
21
+ {
22
+ "impact": "patch",
23
+ "reason": "Appears in changelog section :house: Internal"
24
+ }
25
+ ],
26
+ "pkgJSONPath": "./package.json"
27
+ }
28
+ },
29
+ "description": "## Release (2026-01-28)\n\n* ember.nvp 0.2.0 (minor)\n\n#### :rocket: Enhancement\n* `ember.nvp`\n * [#20](https://github.com/NullVoxPopuli/ember.nvp/pull/20) Implement idemponent and modern qunit layer ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#18](https://github.com/NullVoxPopuli/ember.nvp/pull/18) Ensure the TS utilities handle the babel plugin ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#17](https://github.com/NullVoxPopuli/ember.nvp/pull/17) Support emitting JavaScript projects ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#16](https://github.com/NullVoxPopuli/ember.nvp/pull/16) Commit changes automatically if git is in use ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#14](https://github.com/NullVoxPopuli/ember.nvp/pull/14) Add idempotent GitHub Actions ci.yml ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#11](https://github.com/NullVoxPopuli/ember.nvp/pull/11) Add idempotent renovate config generation ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#9](https://github.com/NullVoxPopuli/ember.nvp/pull/9) Add eslint codemod/applyable, enable type checking internally on the JS ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#8](https://github.com/NullVoxPopuli/ember.nvp/pull/8) Add idempotent prettier codemod/applyable ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#6](https://github.com/NullVoxPopuli/ember.nvp/pull/6) Add git support with proper defaults (ie automatic --skip-git if you are already in a git repo) ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#4](https://github.com/NullVoxPopuli/ember.nvp/pull/4) Implementation: minimal-app ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n\n#### :bug: Bug Fix\n* `ember.nvp`\n * [#22](https://github.com/NullVoxPopuli/ember.nvp/pull/22) Fix accidental stdoutput during git interactions ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#10](https://github.com/NullVoxPopuli/ember.nvp/pull/10) Various CLI fixes ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n\n#### :memo: Documentation\n* `ember.nvp`\n * [#12](https://github.com/NullVoxPopuli/ember.nvp/pull/12) Clarify rationale and usage caveats in README ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n\n#### :house: Internal\n* `ember.nvp`\n * [#19](https://github.com/NullVoxPopuli/ember.nvp/pull/19) Forgot to enable tests for GH Actions ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#21](https://github.com/NullVoxPopuli/ember.nvp/pull/21) Refactor hases and wantses ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#15](https://github.com/NullVoxPopuli/ember.nvp/pull/15) Add reapply test utility for more easily re-applying layers in the manual testing ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#13](https://github.com/NullVoxPopuli/ember.nvp/pull/13) Speed up permutations test ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#7](https://github.com/NullVoxPopuli/ember.nvp/pull/7) Implement idempotent testing for layers that may (or may not) have been applied during the initial generation of a project ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n\n#### Committers: 1\n- [@NullVoxPopuli](https://github.com/NullVoxPopuli)\n"
30
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,54 @@
1
+ # Changelog
2
+
3
+ ## Release (2026-01-28)
4
+
5
+ * ember.nvp 0.2.0 (minor)
6
+
7
+ #### :rocket: Enhancement
8
+ * `ember.nvp`
9
+ * [#20](https://github.com/NullVoxPopuli/ember.nvp/pull/20) Implement idemponent and modern qunit layer ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
10
+ * [#18](https://github.com/NullVoxPopuli/ember.nvp/pull/18) Ensure the TS utilities handle the babel plugin ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
11
+ * [#17](https://github.com/NullVoxPopuli/ember.nvp/pull/17) Support emitting JavaScript projects ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
12
+ * [#16](https://github.com/NullVoxPopuli/ember.nvp/pull/16) Commit changes automatically if git is in use ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
13
+ * [#14](https://github.com/NullVoxPopuli/ember.nvp/pull/14) Add idempotent GitHub Actions ci.yml ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
14
+ * [#11](https://github.com/NullVoxPopuli/ember.nvp/pull/11) Add idempotent renovate config generation ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
15
+ * [#9](https://github.com/NullVoxPopuli/ember.nvp/pull/9) Add eslint codemod/applyable, enable type checking internally on the JS ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
16
+ * [#8](https://github.com/NullVoxPopuli/ember.nvp/pull/8) Add idempotent prettier codemod/applyable ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
17
+ * [#6](https://github.com/NullVoxPopuli/ember.nvp/pull/6) Add git support with proper defaults (ie automatic --skip-git if you are already in a git repo) ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
18
+ * [#4](https://github.com/NullVoxPopuli/ember.nvp/pull/4) Implementation: minimal-app ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
19
+
20
+ #### :bug: Bug Fix
21
+ * `ember.nvp`
22
+ * [#22](https://github.com/NullVoxPopuli/ember.nvp/pull/22) Fix accidental stdoutput during git interactions ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
23
+ * [#10](https://github.com/NullVoxPopuli/ember.nvp/pull/10) Various CLI fixes ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
24
+
25
+ #### :memo: Documentation
26
+ * `ember.nvp`
27
+ * [#12](https://github.com/NullVoxPopuli/ember.nvp/pull/12) Clarify rationale and usage caveats in README ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
28
+
29
+ #### :house: Internal
30
+ * `ember.nvp`
31
+ * [#19](https://github.com/NullVoxPopuli/ember.nvp/pull/19) Forgot to enable tests for GH Actions ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
32
+ * [#21](https://github.com/NullVoxPopuli/ember.nvp/pull/21) Refactor hases and wantses ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
33
+ * [#15](https://github.com/NullVoxPopuli/ember.nvp/pull/15) Add reapply test utility for more easily re-applying layers in the manual testing ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
34
+ * [#13](https://github.com/NullVoxPopuli/ember.nvp/pull/13) Speed up permutations test ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
35
+ * [#7](https://github.com/NullVoxPopuli/ember.nvp/pull/7) Implement idempotent testing for layers that may (or may not) have been applied during the initial generation of a project ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
36
+
37
+ #### Committers: 1
38
+ - [@NullVoxPopuli](https://github.com/NullVoxPopuli)
39
+
40
+ ## Release (2026-01-21)
41
+
42
+ * ember.nvp 0.1.0 (minor)
43
+
44
+ #### :rocket: Enhancement
45
+ * `ember.nvp`
46
+ * [#1](https://github.com/NullVoxPopuli/ember.nvp/pull/1) Implementation planning ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
47
+
48
+ #### :house: Internal
49
+ * `ember.nvp`
50
+ * [#2](https://github.com/NullVoxPopuli/ember.nvp/pull/2) pnpm dlx create-release-plan-setup@latest --update ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
51
+ * [#1](https://github.com/NullVoxPopuli/ember.nvp/pull/1) Implementation planning ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
52
+
53
+ #### Committers: 1
54
+ - [@NullVoxPopuli](https://github.com/NullVoxPopuli)
package/README.md CHANGED
@@ -1,7 +1,59 @@
1
1
  # ember.nvp
2
2
 
3
- _ember project generator: alternative to the official blueprints, but more modern -- hopefully one day to upstream back in to ember-cli / official blueprints_
3
+ _ember project generator: a reenvisioning of blueprints -- hopefully one day to upstream back in to ember-cli / official blueprints, **if** all the caveats can be cleaned up_
4
4
 
5
+ > [!NOTE]
6
+ > **Why isn't this work happening in the default blueprints?** for a long time now, I've felt the old blueprint system from the very early days of ember-cli has not allowed for expressive enough layering of what people actually want out of a project generator. That said, that means there are some compromises in the CLI/generator in this repo. Throughout all files generated, whenever there is a caveat, there will be a comment in the file with the caveat, explaining status, open issues, and how we can collectively move forward. It's possible that one day ember-cli adopts or is inspired by this project, but it's too early to tell at the moment.
7
+
8
+ _I can't recommend using this tool unless your comfortable with the emitted caveats in the project_.
9
+ (And being comfortable debugging build issues is recommended)
10
+
11
+ But I'm very excited about this tool, because it's everything I've ever wanted from a project generator. Each layer is idempotent, and knows about the other layers. So if, for example, you omit eslint when setting up your project, but do have github-actions, when you do add eslint, your github-actions will be updated as well. And this works in any order.
12
+
13
+ ## Usage
14
+
15
+ ```bash
16
+ npx ember.nvp
17
+ ```
18
+
19
+ or, faster:
20
+
21
+ ```bash
22
+ pnpm dlx ember.nvp
23
+ ```
24
+
25
+ Using the unreleased version:
26
+
27
+ ```bash
28
+ pnpm dlx NullVoxPopuli/ember.nvp
29
+ # or, slower:
30
+ npx NullVoxPopuli/ember.nvp
31
+ ```
32
+
33
+ ### Wrapping
34
+
35
+ The provided CLI is only a wrapper around our exported `generateProject` function.
36
+
37
+ Other tools can call `generateProject` themselves if they wish to provide a different terminal or graphical UI.
38
+
39
+ ```js
40
+ import { generateProject, Project } from 'ember.nvp';
41
+
42
+
43
+ await generateProject(new Project(
44
+ directoryToGenerateIn
45
+ // desires
46
+ {
47
+ name,
48
+ path,
49
+ type,
50
+ layers,
51
+ packageManager,
52
+ }
53
+ ));
54
+ ```
55
+
56
+ All parts of the generator are idempotent, so running generators on existing projects _can_ no-op.
5
57
 
6
58
  ## Reqs
7
59
 
@@ -10,11 +62,117 @@ _ember project generator: alternative to the official blueprints, but more moder
10
62
  ## What this does?
11
63
 
12
64
  - Always `"type": "module"`
65
+ - Modern, incremental
13
66
  - Interactive CLI
14
67
  - choose your features
68
+ - The generators fro the different types of projects are never out of date from each other
69
+ - each feature/layer is a mini codemod that has to support working within all the other layers -- so eslint for example is always derived the same way -- no way for "app" and "library" configs to get out of sync
15
70
 
16
71
  Good for:
72
+
17
73
  - demos
18
74
  - reproductions
19
75
  - existing monorepos
20
76
  - example integrations with other tools
77
+
78
+ ## Layers
79
+
80
+ Each layer is a standalone module that can add features to your ember project,
81
+ and every layer is aware of the other layers, so if, for example, you run github actions first, and then later decide to add linting, the github actions output will be updated.
82
+
83
+ ### 🎯 Minimal (always included)
84
+
85
+ The base layer, matching the `--minimal` flag from [ember-cli/ember-app-blueprint#49](https://github.com/ember-cli/ember-app-blueprint/pull/49):
86
+
87
+ - ✅ `"type": "module"` in package.json
88
+ - ✅ No @embroider/compat (faster builds)
89
+ - ✅ No testing framework (minimal setup)
90
+ - ✅ No linting or formatting
91
+ - ✅ No ember-welcome-page
92
+ - ✅ Vite-based with modern Ember
93
+
94
+ Perfect for demos, reproductions, and learning!
95
+
96
+ ### Git
97
+
98
+ Runs `git init` for you.
99
+
100
+ By default this layer is enabled, _unless_ you are running the generator in a git repo already -- then you have to opt in to git.
101
+
102
+ ### GitHub Actions (optional)
103
+
104
+ Adds simple GitHub Actions workflow to your project
105
+
106
+ ### 📝 ESLint (optional)
107
+
108
+ Adds modern ESLint configuration with:
109
+
110
+ - TypeScript support
111
+ - Ember plugin
112
+ - Flat config (ESLint 9+)
113
+ - Prettier compatibility
114
+
115
+ ### 🎨 Prettier (optional)
116
+
117
+ Code formatting with:
118
+
119
+ - GTS/GJS template support
120
+ - Sensible defaults
121
+ - Format scripts
122
+
123
+ ### 🧪 QUnit (optional)
124
+
125
+ - Both co-located tests as well as traditionally located tests with QUnit.
126
+ - New Theme: [qunit-theme-ember](https://github.com/IgnaceMaes/qunit-theme-ember)
127
+ - Default utilities to help you find why tests are stuck
128
+
129
+ ### ⚡ Vitest (optional)
130
+
131
+ Super experimental vitest setup using [ember-vitest](https://github.com/NullVoxPopuli/ember-vitest)
132
+
133
+ ## Architecture
134
+
135
+ ### How Layers Work
136
+
137
+ 1. **Discovery**: CLI scans `src/layers/` and imports each `index.js`
138
+ 2. **Selection**: User selects which optional layers to include
139
+ 3. **Execution**: Each layer's `run()` function is called in sequence:
140
+ ```js
141
+ await layer.run(project);
142
+ ```
143
+ 4. **Layer Functions**: Inside `run()`, layers use [`ember-apply`](https://ember-apply.pages.dev/) to apply codemods in order to:
144
+ - Copy files from `files/` directory
145
+ - Add dependencies/devDependencies to package.json
146
+ - Add npm scripts
147
+ - Modify package.json metadata
148
+ - etc
149
+
150
+ ### Adding New Layers
151
+
152
+ To add a new layer, create a new directory in `src/layers/` with:
153
+
154
+ 1. **`index.js`** - Layer definition:
155
+
156
+ ```js
157
+ import { packageJson, files } from "ember-apply";
158
+ import { join } from "node:path";
159
+
160
+ export default {
161
+ label: "My Feature",
162
+ description: "What this feature does",
163
+
164
+ async run(project) {
165
+ // Copy files from files/ directory
166
+ await files.applyFolder(join(import.meta.dirname, "files"), project.directory);
167
+
168
+ await packageJson.addDependencies({ "some-package": "^1.0.0" }, project.directory);
169
+
170
+ await packageJson.addScripts({ "my-script": 'echo "Hello"' }, project.directory);
171
+ },
172
+ };
173
+ ```
174
+
175
+ 2. **`files/`** directory - Template files to copy:
176
+ - Files will be copied to the target directory maintaining structure
177
+
178
+ The CLI will automatically discover and offer it as an option!
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/NullVoxPopuli/ember.nvp/pulls?q=is%3Apr+is%3Aopen+%22Prepare+Release%22+in%3Atitle) PR
package/package.json CHANGED
@@ -1,10 +1,58 @@
1
1
  {
2
2
  "name": "ember.nvp",
3
- "version": "0.0.0",
3
+ "version": "0.2.0",
4
4
  "description": "ember project generator, alternative to the official blueprints, but more modern -- hopefully one day to upstream back in to ember-cli / official blueprints",
5
- "dependencies": {},
6
- "devDependencies": {},
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git@github.com:NullVoxPopuli/ember.nvp.git"
8
+ },
9
+ "type": "module",
10
+ "bin": "./src/cli/index.js",
11
+ "exports": "./src/index.js",
12
+ "imports": {
13
+ "#args": "./src/cli/args.js",
14
+ "#bases/*": "./src/bases/*/index.js",
15
+ "#consolidators/*": "./src/consolidators/*",
16
+ "#layers": "./src/layers/index.js",
17
+ "#types": "./src/utils/types.ts",
18
+ "#utils/*": "./src/utils/*",
19
+ "#test-helpers": "./test/test-helpers.ts"
20
+ },
21
+ "dependencies": {
22
+ "@clack/prompts": "^0.11.0",
23
+ "babel-remove-types": "^1.1.0",
24
+ "content-tag": "^4.1.0",
25
+ "ember-apply": "^2.17.0",
26
+ "execa": "^9.6.1",
27
+ "latest-version": "^9.0.0",
28
+ "package-name-regex": "^5.0.0"
29
+ },
30
+ "devDependencies": {
31
+ "@ember/app-tsconfig": "^2.0.0",
32
+ "@ember/library-tsconfig": "^2.0.0",
33
+ "@glint/ember-tsc": "^1.0.9",
34
+ "@glint/template": "^1.7.3",
35
+ "@glint/tsserver-plugin": "^2.0.9",
36
+ "concurrently": "^9.2.1",
37
+ "ember-source": "^6.10.0",
38
+ "prettier": "^3.7.4",
39
+ "prettier-plugin-ember-template-tag": "^2.1.2",
40
+ "release-plan": "^0.17.4",
41
+ "rimraf": "^6.1.2",
42
+ "vite": "^7.3.1",
43
+ "vitest": "^4.0.17"
44
+ },
7
45
  "engines": {
8
46
  "node": ">= 24"
47
+ },
48
+ "scripts": {
49
+ "lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\" --prefixColors auto",
50
+ "lint:fix": "pnpm format",
51
+ "lint:types": "tsc --noEmit",
52
+ "format": "prettier . --write",
53
+ "lint:format": "prettier . --check",
54
+ "new": "./test/manual.sh",
55
+ "test:node": "FORCE_COLOR=1 vitest run --reporter=verbose --printConsoleTrace",
56
+ "test:vitest": "FORCE_COLOR=1 vitest"
9
57
  }
10
58
  }
@@ -0,0 +1,3 @@
1
+ packages:
2
+ - .
3
+ - src/bases/*/files
@@ -0,0 +1,5 @@
1
+ Each of these base projects are _real_ projects that can be ran in these directories.
2
+
3
+ For changing the name of a project, the code in the base layer's index.js should find all the places the name is used and swap it out (codemod style).
4
+
5
+ We don't want to use ejs, because it makes the base layers unrunnable.