@stencil/cli 5.0.0-beta.24 → 5.0.0-beta.26
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/dist/index.mjs +32 -3
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1263,7 +1263,7 @@ function clearInheritedProductionEnv() {
|
|
|
1263
1263
|
}
|
|
1264
1264
|
//#endregion
|
|
1265
1265
|
//#region src/wizard/splash.ts
|
|
1266
|
-
const CLI_VERSION = "5.0.0-beta.
|
|
1266
|
+
const CLI_VERSION = "5.0.0-beta.26";
|
|
1267
1267
|
const isTTY = process.stdout.isTTY;
|
|
1268
1268
|
const noColor = !isTTY || "NO_COLOR" in process.env;
|
|
1269
1269
|
const RESET = noColor ? "" : "\x1B[0m";
|
|
@@ -3499,6 +3499,32 @@ const taskGenerate = async (config, flags) => {
|
|
|
3499
3499
|
cancelIfAborted(componentType);
|
|
3500
3500
|
const isCssOnly = componentType === "css-only";
|
|
3501
3501
|
if (isCssOnly && config.enableCssOnlyComponents === false) p.note("`enableCssOnlyComponents` is disabled in your stencil.config - this component will not be discovered until it is re-enabled.", "Warning");
|
|
3502
|
+
let encapsulation = "none";
|
|
3503
|
+
if (!isCssOnly) {
|
|
3504
|
+
const encapsulationPick = await p.select({
|
|
3505
|
+
message: "Encapsulation:",
|
|
3506
|
+
initialValue: "none",
|
|
3507
|
+
options: [
|
|
3508
|
+
{
|
|
3509
|
+
value: "none",
|
|
3510
|
+
label: "None",
|
|
3511
|
+
hint: "light DOM, global styles"
|
|
3512
|
+
},
|
|
3513
|
+
{
|
|
3514
|
+
value: "scoped",
|
|
3515
|
+
label: "Scoped",
|
|
3516
|
+
hint: "light DOM, styles scoped via generated classes"
|
|
3517
|
+
},
|
|
3518
|
+
{
|
|
3519
|
+
value: "shadow",
|
|
3520
|
+
label: "Shadow",
|
|
3521
|
+
hint: "shadow DOM"
|
|
3522
|
+
}
|
|
3523
|
+
]
|
|
3524
|
+
});
|
|
3525
|
+
cancelIfAborted(encapsulationPick);
|
|
3526
|
+
encapsulation = encapsulationPick;
|
|
3527
|
+
}
|
|
3502
3528
|
const styleExtOptions = [{
|
|
3503
3529
|
value: "css",
|
|
3504
3530
|
label: "CSS (.css)"
|
|
@@ -3579,11 +3605,14 @@ const taskGenerate = async (config, flags) => {
|
|
|
3579
3605
|
else {
|
|
3580
3606
|
filesToWrite.push({
|
|
3581
3607
|
absPath: normalizePath(join(outDir, `${componentName}.tsx`)),
|
|
3582
|
-
content: getComponentBoilerplate(componentName,
|
|
3608
|
+
content: getComponentBoilerplate(componentName, {
|
|
3609
|
+
styleExtension,
|
|
3610
|
+
encapsulation
|
|
3611
|
+
})
|
|
3583
3612
|
});
|
|
3584
3613
|
if (styleExtension) filesToWrite.push({
|
|
3585
3614
|
absPath: normalizePath(join(outDir, `${componentName}.${styleExtension}`)),
|
|
3586
|
-
content: getStyleBoilerplate(styleExtension)
|
|
3615
|
+
content: getStyleBoilerplate(componentName, styleExtension, encapsulation)
|
|
3587
3616
|
});
|
|
3588
3617
|
}
|
|
3589
3618
|
for (const ext of pickedExtensions) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/cli",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.26",
|
|
4
4
|
"description": "CLI for Stencil - Web component compiler",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -42,16 +42,16 @@
|
|
|
42
42
|
"nypm": "^0.3.12",
|
|
43
43
|
"std-env": "^3.10.0",
|
|
44
44
|
"typescript": ">5.0.0 <7.0.0",
|
|
45
|
-
"@stencil/dev-server": "5.0.0-beta.
|
|
46
|
-
"@stencil/templates": "5.0.0-beta.
|
|
45
|
+
"@stencil/dev-server": "5.0.0-beta.26",
|
|
46
|
+
"@stencil/templates": "5.0.0-beta.26"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"tsdown": "^0.22.14",
|
|
50
50
|
"vitest": "^4.1.10",
|
|
51
|
-
"@stencil/core": "5.0.0-beta.
|
|
51
|
+
"@stencil/core": "5.0.0-beta.26"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@stencil/core": "^5.0.0 || 5.0.0-beta.
|
|
54
|
+
"@stencil/core": "^5.0.0 || 5.0.0-beta.26"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=22.0.0"
|