@plumeria/init 19.6.0 → 19.6.2
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/cli.js +0 -3
- package/dist/prompt.js +6 -6
- package/dist/setup.d.ts +1 -1
- package/dist/setup.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,12 +34,12 @@ Next.js gets `@plumeria/next-plugin`; every other bundler gets
|
|
|
34
34
|
|
|
35
35
|
## What it asks
|
|
36
36
|
|
|
37
|
-
**Which spelling
|
|
37
|
+
**Which spelling should lint enforce?** —
|
|
38
38
|
`marginBlockStart` or `marginTop`. The answer reaches both sides at once: the
|
|
39
39
|
bundler plugin gets `withoutLogicalProperties` or `withoutPhysicalProperties`,
|
|
40
40
|
so the counterpart cannot compile, and ESLint gets
|
|
41
41
|
`@plumeria/no-logical-properties` or `@plumeria/no-physical-properties`, so it
|
|
42
|
-
is reported while you type. Answering "
|
|
42
|
+
is reported while you type. Answering "none" sets neither. `--sizes` extends
|
|
43
43
|
the answer to the size axis, where `width` and `inlineSize` are the pair.
|
|
44
44
|
|
|
45
45
|
**Expand a border shorthand into the three declarations it sets?** — turns on
|
package/dist/cli.js
CHANGED
package/dist/prompt.js
CHANGED
|
@@ -10,13 +10,13 @@ const style_1 = require("./style");
|
|
|
10
10
|
const SPELLINGS = {
|
|
11
11
|
'1': 'logical',
|
|
12
12
|
'2': 'physical',
|
|
13
|
-
'3': '
|
|
13
|
+
'3': 'none',
|
|
14
14
|
l: 'logical',
|
|
15
15
|
logical: 'logical',
|
|
16
16
|
p: 'physical',
|
|
17
17
|
physical: 'physical',
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
n: 'none',
|
|
19
|
+
none: 'none',
|
|
20
20
|
};
|
|
21
21
|
const terminal = () => {
|
|
22
22
|
const rl = promises_1.default.createInterface({
|
|
@@ -43,9 +43,9 @@ const ask = async (asker, preset) => {
|
|
|
43
43
|
const choices = [
|
|
44
44
|
['1', 'logical', 'marginBlockStart, insetInlineStart'],
|
|
45
45
|
['2', 'physical', 'marginTop, left'],
|
|
46
|
-
['3', '
|
|
46
|
+
['3', 'none', 'no policy'],
|
|
47
47
|
];
|
|
48
|
-
console.log(`\nWhich spelling
|
|
48
|
+
console.log(`\nWhich spelling should lint enforce?`);
|
|
49
49
|
for (const [key, name, hint] of choices) {
|
|
50
50
|
console.log(` ${style_1.style.choice(`${key}:`)} ${name.padEnd(9)}${style_1.style.faint(hint)}`);
|
|
51
51
|
}
|
|
@@ -64,7 +64,7 @@ const ask = async (asker, preset) => {
|
|
|
64
64
|
console.log(`${style_1.style.failure('✖')} answer 1, 2 or 3.`);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
if (answers.spelling !== '
|
|
67
|
+
if (answers.spelling !== 'none' && preset.sizes === undefined) {
|
|
68
68
|
answers.sizes = await confirm(asker, 'Reject the size axis too (width/height ↔ inlineSize/blockSize)?', false);
|
|
69
69
|
}
|
|
70
70
|
if (preset.expandBorderShorthands === undefined) {
|
package/dist/setup.d.ts
CHANGED
package/dist/setup.js
CHANGED
|
@@ -20,7 +20,7 @@ const assertStyleProp = (value) => {
|
|
|
20
20
|
};
|
|
21
21
|
exports.assertStyleProp = assertStyleProp;
|
|
22
22
|
exports.DEFAULT_ANSWERS = {
|
|
23
|
-
spelling: '
|
|
23
|
+
spelling: 'none',
|
|
24
24
|
sizes: false,
|
|
25
25
|
styleProp: exports.DEFAULT_STYLE_PROP,
|
|
26
26
|
expandBorderShorthands: true,
|
|
@@ -45,7 +45,7 @@ const INSTALL = {
|
|
|
45
45
|
yarn: 'yarn add -D',
|
|
46
46
|
bun: 'bun add -d',
|
|
47
47
|
};
|
|
48
|
-
const rejectedSpelling = (spelling) => spelling === '
|
|
48
|
+
const rejectedSpelling = (spelling) => spelling === 'none'
|
|
49
49
|
? undefined
|
|
50
50
|
: spelling === 'logical'
|
|
51
51
|
? 'physical'
|
package/package.json
CHANGED