https://github.com/NullVoxPopuli/ember.nvp
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
https://github.com/NullVoxPopuli/ember.nvp
Last synced: 3 months ago
JSON representation
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
- Host: GitHub
- URL: https://github.com/NullVoxPopuli/ember.nvp
- Owner: NullVoxPopuli
- License: mit
- Created: 2026-01-13T17:11:23.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2026-01-28T05:46:36.000Z (6 months ago)
- Last Synced: 2026-01-28T21:37:53.438Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 425 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ember - ember.nvp - Ember project generator with idempotent, layered features โ a reenvisioning of blueprints (Tools / Development)
README
# ember.nvp
_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_
> [!NOTE]
> **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.
_I can't recommend using this tool unless your comfortable with the emitted caveats in the project_.
(And being comfortable debugging build issues is recommended)
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.
## Usage
```bash
npx ember.nvp
```
or, faster:
```bash
pnpm dlx ember.nvp
```
Using the unreleased version:
```bash
pnpm dlx NullVoxPopuli/ember.nvp
# or, slower:
npx NullVoxPopuli/ember.nvp
```
### Wrapping
The provided CLI is only a wrapper around our exported `generateProject` function.
Other tools can call `generateProject` themselves if they wish to provide a different terminal or graphical UI.
```js
import { generateProject, Project } from 'ember.nvp';
await generateProject(new Project(
directoryToGenerateIn
// desires
{
name,
path,
type,
layers,
packageManager,
}
));
```
All parts of the generator are idempotent, so running generators on existing projects _can_ no-op.
## Reqs
- node 24+
## What this does?
- Always `"type": "module"`
- Modern, incremental
- Interactive CLI
- choose your features
- The generators fro the different types of projects are never out of date from each other
- 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
Good for:
- demos
- reproductions
- existing monorepos
- example integrations with other tools
## Layers
Each layer is a standalone module that can add features to your ember project,
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.
### ๐ฏ Minimal (always included)
The base layer, matching the `--minimal` flag from [ember-cli/ember-app-blueprint#49](https://github.com/ember-cli/ember-app-blueprint/pull/49):
- โ
`"type": "module"` in package.json
- โ
No @embroider/compat (faster builds)
- โ
No testing framework (minimal setup)
- โ
No linting or formatting
- โ
No ember-welcome-page
- โ
Vite-based with modern Ember
Perfect for demos, reproductions, and learning!
### Git
Runs `git init` for you.
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.
### GitHub Actions (optional)
Adds simple GitHub Actions workflow to your project
### ๐ ESLint (optional)
Adds modern ESLint configuration with:
- TypeScript support
- Ember plugin
- Flat config (ESLint 9+)
- Prettier compatibility
### ๐จ Prettier (optional)
Code formatting with:
- GTS/GJS template support
- Sensible defaults
- Format scripts
### ๐งช QUnit (optional)
- Both co-located tests as well as traditionally located tests with QUnit.
- New Theme: [qunit-theme-ember](https://github.com/IgnaceMaes/qunit-theme-ember)
- Default utilities to help you find why tests are stuck
### โก Vitest (optional)
Super experimental vitest setup using [ember-vitest](https://github.com/NullVoxPopuli/ember-vitest)
## Architecture
### How Layers Work
1. **Discovery**: CLI scans `src/layers/` and imports each `index.js`
2. **Selection**: User selects which optional layers to include
3. **Execution**: Each layer's `run()` function is called in sequence:
```js
await layer.run(project);
```
4. **Layer Functions**: Inside `run()`, layers use [`ember-apply`](https://ember-apply.pages.dev/) to apply codemods in order to:
- Copy files from `files/` directory
- Add dependencies/devDependencies to package.json
- Add npm scripts
- Modify package.json metadata
- etc
### Adding New Layers
To add a new layer, create a new directory in `src/layers/` with:
1. **`index.js`** - Layer definition:
```js
import { packageJson, files } from "ember-apply";
import { join } from "node:path";
export default {
label: "My Feature",
description: "What this feature does",
async run(project) {
// Copy files from files/ directory
await files.applyFolder(join(import.meta.dirname, "files"), project.directory);
await packageJson.addDependencies({ "some-package": "^1.0.0" }, project.directory);
await packageJson.addScripts({ "my-script": 'echo "Hello"' }, project.directory);
},
};
```
2. **`files/`** directory - Template files to copy:
- Files will be copied to the target directory maintaining structure
The CLI will automatically discover and offer it as an option!