@plumeria/init 19.10.3 → 19.11.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 +2 -2
- package/dist/setup.js +7 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ refused, from the prompt and from `--style-prop` alike.
|
|
|
52
52
|
extends the flat config, so a style error is reported while you type. The build
|
|
53
53
|
lints either way: the bundler plugin runs the same rules alongside the build and
|
|
54
54
|
stops it on a style error. On esbuild and Bun, which the plugin cannot lint,
|
|
55
|
-
the `build` script is prefixed with `
|
|
55
|
+
the `build` script is prefixed with `plumeria-lint --` instead.
|
|
56
56
|
|
|
57
57
|
## What it writes
|
|
58
58
|
|
|
@@ -63,7 +63,7 @@ the `build` script is prefixed with `plumerialint --` instead.
|
|
|
63
63
|
wrapped in `withPlumeria`.
|
|
64
64
|
- `eslint.config.ts` — `plumeria.configs.recommended` plus the rules that were
|
|
65
65
|
asked for, and `settings.plumeria.styleProp` when the styling prop was renamed. An existing flat config is extended rather than replaced.
|
|
66
|
-
- `package.json` — on esbuild and Bun, `
|
|
66
|
+
- `package.json` — on esbuild and Bun, `plumeria-lint --` in front of the `build`
|
|
67
67
|
script, with `--style-prop` when the styling prop was renamed, and on Next.js `rimraf .next` before `dev` and before `build`, so a version change is
|
|
68
68
|
not read as a compile error. A `pre` script is added only for a script the
|
|
69
69
|
project actually has, and one it already wrote is left alone. Clearing the
|
package/dist/setup.js
CHANGED
|
@@ -236,8 +236,8 @@ const indentOfJson = (source) => {
|
|
|
236
236
|
return match ? match[1].length : 2;
|
|
237
237
|
};
|
|
238
238
|
const buildScript = (existing, styleProp) => styleProp === exports.DEFAULT_STYLE_PROP
|
|
239
|
-
? `
|
|
240
|
-
: `
|
|
239
|
+
? `plumeria-lint -- ${existing}`
|
|
240
|
+
: `plumeria-lint --style-prop ${styleProp} -- ${existing}`;
|
|
241
241
|
exports.buildScript = buildScript;
|
|
242
242
|
const plan = (detected, answers) => {
|
|
243
243
|
const actions = [];
|
|
@@ -470,7 +470,11 @@ const scriptAction = (detected, answers) => {
|
|
|
470
470
|
const notes = [];
|
|
471
471
|
const existing = scripts.build;
|
|
472
472
|
const guard = answers.eslint && guardsByScript(detected);
|
|
473
|
-
if (guard && existing &&
|
|
473
|
+
if (guard && existing && existing.includes('plumerialint')) {
|
|
474
|
+
scripts.build = existing.replace(/plumerialint/g, 'plumeria-lint');
|
|
475
|
+
notes.push(`build: ${scripts.build}`);
|
|
476
|
+
}
|
|
477
|
+
else if (guard && existing && !existing.includes('plumeria-lint')) {
|
|
474
478
|
scripts.build = (0, exports.buildScript)(existing, answers.styleProp);
|
|
475
479
|
notes.push(`build: ${scripts.build}`);
|
|
476
480
|
}
|
package/package.json
CHANGED