create-brutal 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/cli.js +1 -1
- package/dist/stackRefs.json +2 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# create-brutal
|
|
2
2
|
|
|
3
|
-
Creates a project from one of the [BRUTAL](https://github.com/Elnop/
|
|
3
|
+
Creates a project from one of the [BRUTAL](https://github.com/Elnop/brutal) templates and lets you drop the parts you do not need. Whatever you pick, the project passes `npm run check` on the first run.
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
6
|
npm create brutal my-app
|
|
@@ -43,11 +43,11 @@ npm create brutal my-app -- --preset minimal.json --yes
|
|
|
43
43
|
|
|
44
44
|
## How it works
|
|
45
45
|
|
|
46
|
-
Each version of the package downloads every template at the commit its submodule points to in
|
|
46
|
+
Each version of the package downloads every template at the commit its submodule points to in this repository (`dist/stackRefs.json`, written at build time), so a given version always produces the same project. The options are described in `src/stacks/viteStack.ts` and `src/stacks/fastifyStack.ts`: files to remove, text to replace in the docs and configs, scripts and dependencies to drop, and files to copy from `overlays/`. A replacement whose text cannot be found stops the CLI with the file name and the missing text, rather than producing a half-edited project.
|
|
47
47
|
|
|
48
48
|
## Developing
|
|
49
49
|
|
|
50
|
-
From the root of
|
|
50
|
+
From the root of the repository:
|
|
51
51
|
|
|
52
52
|
```sh
|
|
53
53
|
npm install
|
|
@@ -55,4 +55,4 @@ node create-brutal/src/cli.ts ../my-app --local
|
|
|
55
55
|
npm run matrix
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
`--local` copies the templates from the submodules, local changes included. `npm run matrix` creates a project for every combination of options (options marked `independent` are switched on and off without being crossed with the others), installs it, then runs `npm run check` and `npm test`. `--e2e` adds `npm run e2e` (use `--jobs 1`, Playwright needs port 4173), `--keep` keeps the projects in `
|
|
58
|
+
`--local` copies the templates from the submodules, local changes included. `npm run matrix` creates a project for every combination of options (options marked `independent` are switched on and off without being crossed with the others), installs it, then runs `npm run check` and `npm test`. `--e2e` adds `npm run e2e` (use `--jobs 1`, Playwright needs port 4173), `--keep` keeps the projects in `brutal-matrix/` under the system temp folder, outside the repository so that no project picks up its `node_modules`.
|
package/dist/cli.js
CHANGED
|
@@ -17,7 +17,7 @@ const USAGE = `Usage: npm create brutal [dir] -- [flags]
|
|
|
17
17
|
--yes, -y take the default of every question left
|
|
18
18
|
--no-git skip git init (the pre-commit hook is dropped)
|
|
19
19
|
--no-install skip npm install
|
|
20
|
-
--local copy the templates from this
|
|
20
|
+
--local copy the templates from this brutal checkout
|
|
21
21
|
|
|
22
22
|
Each stack option has a flag: --<option> or --no-<option>.
|
|
23
23
|
${stacks.map((stack) => ` ${stack.id}: ${stack.options.map((option) => option.id).join(', ')}`).join('\n')}`;
|
package/dist/stackRefs.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-brutal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Creates a project from one of the BRUTAL templates, where every convention is a check.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"create",
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
"conventions",
|
|
13
13
|
"ai-agents"
|
|
14
14
|
],
|
|
15
|
-
"homepage": "https://github.com/Elnop/
|
|
16
|
-
"bugs": "https://github.com/Elnop/
|
|
15
|
+
"homepage": "https://github.com/Elnop/brutal/tree/main/create-brutal#readme",
|
|
16
|
+
"bugs": "https://github.com/Elnop/brutal/issues",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/Elnop/
|
|
19
|
+
"url": "git+https://github.com/Elnop/brutal.git",
|
|
20
20
|
"directory": "create-brutal"
|
|
21
21
|
},
|
|
22
22
|
"license": "MIT",
|