@stencil/cli 5.0.0-beta.21 → 5.0.0-beta.23
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.d.mts +1 -1
- package/dist/index.mjs +22 -9
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -10,7 +10,7 @@ type TaskCommand = 'add' | 'build' | 'docs' | 'generate' | 'g' | 'help' | 'info'
|
|
|
10
10
|
/**
|
|
11
11
|
* All the Boolean options supported by the Stencil CLI
|
|
12
12
|
*/
|
|
13
|
-
declare const BOOLEAN_CLI_FLAGS: readonly ["cache", "ci", "debug", "dev", "
|
|
13
|
+
declare const BOOLEAN_CLI_FLAGS: readonly ["cache", "ci", "debug", "dev", "dryRun", "help", "log", "open", "prerender", "profile", "serviceWorker", "serve", "ssr", "verbose", "version", "watch"];
|
|
14
14
|
/**
|
|
15
15
|
* All the Number options supported by the Stencil CLI
|
|
16
16
|
*/
|
package/dist/index.mjs
CHANGED
|
@@ -24,7 +24,6 @@ const BOOLEAN_CLI_FLAGS = [
|
|
|
24
24
|
"ci",
|
|
25
25
|
"debug",
|
|
26
26
|
"dev",
|
|
27
|
-
"docs",
|
|
28
27
|
"dryRun",
|
|
29
28
|
"help",
|
|
30
29
|
"log",
|
|
@@ -587,7 +586,6 @@ const mergeFlags = (config, flags) => {
|
|
|
587
586
|
if (flags.debug === true || flags.verbose === true) merged.logLevel = "debug";
|
|
588
587
|
else if (flags.logLevel) merged.logLevel = flags.logLevel;
|
|
589
588
|
if (typeof flags.watch === "boolean") merged.watch = flags.watch;
|
|
590
|
-
if (flags.docs === true || flags.task === "docs") merged._docsFlag = true;
|
|
591
589
|
if (typeof flags.profile === "boolean") merged.profile = flags.profile;
|
|
592
590
|
if (typeof flags.log === "boolean") merged.writeLog = flags.log;
|
|
593
591
|
if (typeof flags.cache === "boolean") merged.enableCache = flags.cache;
|
|
@@ -1265,7 +1263,7 @@ function clearInheritedProductionEnv() {
|
|
|
1265
1263
|
}
|
|
1266
1264
|
//#endregion
|
|
1267
1265
|
//#region src/wizard/splash.ts
|
|
1268
|
-
const CLI_VERSION = "5.0.0-beta.
|
|
1266
|
+
const CLI_VERSION = "5.0.0-beta.23";
|
|
1269
1267
|
const isTTY = process.stdout.isTTY;
|
|
1270
1268
|
const noColor = !isTTY || "NO_COLOR" in process.env;
|
|
1271
1269
|
const RESET = noColor ? "" : "\x1B[0m";
|
|
@@ -3274,6 +3272,7 @@ const taskWatch = async (coreCompiler, config, flags) => {
|
|
|
3274
3272
|
//#endregion
|
|
3275
3273
|
//#region src/task-build.ts
|
|
3276
3274
|
const taskBuild = async (coreCompiler, config, flags) => {
|
|
3275
|
+
if (flags.unknownArgs?.includes("--docs")) config.logger.warn(`The --docs flag has been removed. To generate docs in a dev build, set "skipInDev: false" on the docs output targets, or run "stencil docs" (optionally with --watch).`);
|
|
3277
3276
|
if (flags.watch) {
|
|
3278
3277
|
await taskWatch(coreCompiler, config, flags);
|
|
3279
3278
|
return;
|
|
@@ -3389,14 +3388,27 @@ async function promptForMigration(config, migrationResult, context) {
|
|
|
3389
3388
|
}
|
|
3390
3389
|
//#endregion
|
|
3391
3390
|
//#region src/task-docs.ts
|
|
3392
|
-
const taskDocs = async (coreCompiler, config) => {
|
|
3391
|
+
const taskDocs = async (coreCompiler, config, flags) => {
|
|
3393
3392
|
config.devServer = {};
|
|
3394
3393
|
config.outputTargets = config.outputTargets.filter(isOutputTargetDocs);
|
|
3395
3394
|
config.devMode = true;
|
|
3395
|
+
config.outputTargets.forEach((o) => o.skipInDev = false);
|
|
3396
|
+
if (config.outputTargets.length === 0) {
|
|
3397
|
+
config.logger.warn(`No docs output targets are configured, so there is nothing to generate. Add one to "outputTargets" (e.g. { type: 'docs-readme' }) or use --docsJson <path>.`);
|
|
3398
|
+
return;
|
|
3399
|
+
}
|
|
3400
|
+
if (flags.watch) {
|
|
3401
|
+
await taskWatch(coreCompiler, config, {
|
|
3402
|
+
...flags,
|
|
3403
|
+
serve: false
|
|
3404
|
+
});
|
|
3405
|
+
return;
|
|
3406
|
+
}
|
|
3396
3407
|
startupCompilerLog(coreCompiler, config);
|
|
3397
3408
|
const compiler = await coreCompiler.createCompiler(config);
|
|
3398
|
-
await compiler.build();
|
|
3409
|
+
const results = await compiler.build();
|
|
3399
3410
|
await compiler.destroy();
|
|
3411
|
+
if (results.hasError) return config.sys.exit(1);
|
|
3400
3412
|
};
|
|
3401
3413
|
//#endregion
|
|
3402
3414
|
//#region src/resolve-entry-script.ts
|
|
@@ -3635,12 +3647,12 @@ const taskHelp = async (logger, sys) => {
|
|
|
3635
3647
|
${logger.cyan("--watch")} ${logger.dim("...........")} Rebuild when files update
|
|
3636
3648
|
${logger.cyan("--serve")} ${logger.dim("...........")} Start the dev-server (requires --watch)
|
|
3637
3649
|
${logger.cyan("--prerender")} ${logger.dim(".......")} Prerender the application
|
|
3638
|
-
${logger.cyan("--docs")} ${logger.dim("............")} Also generate docs output targets in a --dev build
|
|
3639
3650
|
${logger.cyan("--ssr")} ${logger.dim(".............")} Build a server-side-rendering bundle
|
|
3640
3651
|
${logger.cyan("--config")} ${logger.dim("..........")} Set stencil config file
|
|
3641
3652
|
${logger.cyan("--maxWorkers")} ${logger.dim("......")} Max number of workers, e.g. --maxWorkers 4
|
|
3642
3653
|
${logger.cyan("--no-cache")} ${logger.dim("........")} Disable the build cache
|
|
3643
3654
|
${logger.cyan("--stats")} ${logger.dim("...........")} Write stats, optional file path (default: stencil-stats.json)
|
|
3655
|
+
${logger.cyan("--docsJson")} ${logger.dim("........")} Also write a docs.json file to the given path
|
|
3644
3656
|
${logger.cyan("--log")} ${logger.dim(".............")} Write stencil-build.log file
|
|
3645
3657
|
${logger.cyan("--ci")} ${logger.dim("..............")} Run in CI mode (disables colors, version checks)
|
|
3646
3658
|
${logger.cyan("--debug")} ${logger.dim("...........")} Set the log level to debug
|
|
@@ -3655,10 +3667,11 @@ const taskHelp = async (logger, sys) => {
|
|
|
3655
3667
|
${logger.cyan("--open")} ${logger.dim("............")} Open the browser
|
|
3656
3668
|
|
|
3657
3669
|
|
|
3658
|
-
${logger.bold("Docs:")} ${logger.dim("Generate
|
|
3670
|
+
${logger.bold("Docs:")} ${logger.dim("Generate only the docs output targets (a production build already includes them).")}
|
|
3659
3671
|
|
|
3660
|
-
${prompt} ${logger.green("stencil docs [--docsJson]")}
|
|
3672
|
+
${prompt} ${logger.green("stencil docs [--watch] [--docsJson]")}
|
|
3661
3673
|
|
|
3674
|
+
${logger.cyan("--watch")} ${logger.dim("...........")} Regenerate when files update
|
|
3662
3675
|
${logger.cyan("--docsJson")} ${logger.dim("........")} Write a docs.json file to the given path
|
|
3663
3676
|
|
|
3664
3677
|
|
|
@@ -4283,7 +4296,7 @@ const runTask = async (coreCompiler, config, task, sys, flags) => {
|
|
|
4283
4296
|
await taskBuild(coreCompiler, strictConfig, resolvedFlags);
|
|
4284
4297
|
break;
|
|
4285
4298
|
case "docs":
|
|
4286
|
-
await taskDocs(coreCompiler, strictConfig);
|
|
4299
|
+
await taskDocs(coreCompiler, strictConfig, resolvedFlags);
|
|
4287
4300
|
break;
|
|
4288
4301
|
case "generate":
|
|
4289
4302
|
case "g":
|
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.23",
|
|
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.23",
|
|
46
|
+
"@stencil/templates": "5.0.0-beta.23"
|
|
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.23"
|
|
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.23"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=22.0.0"
|