@stencil/cli 5.0.0-alpha.1 → 5.0.0-next.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/bin/stencil.mjs +3 -7
- package/dist/index.d.mts +8 -11
- package/dist/index.mjs +75 -55
- package/package.json +23 -26
package/bin/stencil.mjs
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
process.env.NODE_ENV ??= 'production';
|
|
6
|
-
|
|
7
|
-
import { run } from '@stencil/cli';
|
|
8
|
-
import { createNodeLogger, createNodeSys } from '@stencil/core/sys/node';
|
|
3
|
+
import { run } from '@stencil/cli'
|
|
4
|
+
import { createNodeLogger, createNodeSys } from '@stencil/core/sys/node'
|
|
9
5
|
|
|
10
6
|
run({
|
|
11
7
|
args: process.argv.slice(2),
|
|
12
8
|
logger: createNodeLogger(),
|
|
13
9
|
sys: createNodeSys(),
|
|
14
|
-
})
|
|
10
|
+
})
|
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _stencil_core_compiler0 from "@stencil/core/compiler";
|
|
2
2
|
import { LogLevel } from "@stencil/core/compiler";
|
|
3
3
|
|
|
4
|
-
//#region src/types.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Supported CLI task commands
|
|
7
|
-
*/
|
|
8
|
-
type TaskCommand = 'build' | 'docs' | 'generate' | 'g' | 'help' | 'info' | 'prerender' | 'serve' | 'telemetry' | 'test' | 'version';
|
|
9
|
-
//#endregion
|
|
10
4
|
//#region src/config-flags.d.ts
|
|
11
5
|
/**
|
|
12
6
|
* All the Boolean options supported by the Stencil CLI
|
|
@@ -123,7 +117,7 @@ declare const createConfigFlags: (init?: Partial<ConfigFlags>) => ConfigFlags;
|
|
|
123
117
|
declare const parseFlags: (args: string[]) => ConfigFlags;
|
|
124
118
|
//#endregion
|
|
125
119
|
//#region src/load-compiler.d.ts
|
|
126
|
-
type CoreCompiler = typeof
|
|
120
|
+
type CoreCompiler = typeof _stencil_core_compiler0;
|
|
127
121
|
//#endregion
|
|
128
122
|
//#region src/run.d.ts
|
|
129
123
|
/**
|
|
@@ -136,7 +130,7 @@ type CoreCompiler = typeof _$_stencil_core_compiler0;
|
|
|
136
130
|
* @param init initial CLI options
|
|
137
131
|
* @returns an empty promise
|
|
138
132
|
*/
|
|
139
|
-
declare const run: (init:
|
|
133
|
+
declare const run: (init: _stencil_core_compiler0.CliInitOptions) => Promise<void>;
|
|
140
134
|
/**
|
|
141
135
|
* Run a specified task
|
|
142
136
|
*
|
|
@@ -148,6 +142,9 @@ declare const run: (init: _$_stencil_core_compiler0.CliInitOptions) => Promise<a
|
|
|
148
142
|
* @public
|
|
149
143
|
* @returns a void promise
|
|
150
144
|
*/
|
|
151
|
-
declare const runTask: (coreCompiler: CoreCompiler, config:
|
|
145
|
+
declare const runTask: (coreCompiler: CoreCompiler, config: _stencil_core_compiler0.Config, task: TaskCommand, sys: _stencil_core_compiler0.CompilerSystem, flags?: ConfigFlags) => Promise<void>;
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region src/index.d.ts
|
|
148
|
+
type TaskCommand = 'build' | 'docs' | 'generate' | 'g' | 'help' | 'info' | 'prerender' | 'serve' | 'telemetry' | 'test' | 'version';
|
|
152
149
|
//#endregion
|
|
153
|
-
export { BOOLEAN_CLI_FLAGS, type ConfigFlags,
|
|
150
|
+
export { BOOLEAN_CLI_FLAGS, type ConfigFlags, TaskCommand, createConfigFlags, parseFlags, run, runTask };
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { LOG_LEVELS } from "@stencil/core/compiler";
|
|
2
1
|
import { buildError, catchError, hasError, isFunction, isOutputTargetDocs, isOutputTargetHydrate, isOutputTargetWww, isString, normalizePath, readOnlyArrayHasStringMember, result, shouldIgnoreError, toCamelCase, validateComponentTag } from "@stencil/core/compiler/utils";
|
|
2
|
+
import { LOG_LEVELS } from "@stencil/core/compiler";
|
|
3
3
|
import { join, parse, relative } from "path";
|
|
4
4
|
import { start } from "@stencil/dev-server";
|
|
5
|
+
|
|
5
6
|
//#region src/config-flags.ts
|
|
6
7
|
/**
|
|
7
8
|
* All the Boolean options supported by the Stencil CLI
|
|
@@ -206,6 +207,7 @@ const createConfigFlags = (init = {}) => {
|
|
|
206
207
|
...init
|
|
207
208
|
};
|
|
208
209
|
};
|
|
210
|
+
|
|
209
211
|
//#endregion
|
|
210
212
|
//#region src/parse-flags.ts
|
|
211
213
|
/**
|
|
@@ -415,7 +417,7 @@ const setCLIArg = (flags, rawArg, normalizedArg, value) => {
|
|
|
415
417
|
* be parsed as a string literal, rather than using `Number` to convert it
|
|
416
418
|
* to a number.
|
|
417
419
|
*/
|
|
418
|
-
const CLI_ARG_STRING_REGEX = /[^\d
|
|
420
|
+
const CLI_ARG_STRING_REGEX = /[^\d\.Ee\+\-]+/g;
|
|
419
421
|
const Empty = Symbol("Empty");
|
|
420
422
|
/**
|
|
421
423
|
* A little helper which tries to parse a CLI value (as opposed to a flag) off
|
|
@@ -532,6 +534,7 @@ const desugarAlias = (maybeAlias) => {
|
|
|
532
534
|
* @returns an equivalent full command (like `"--config"`)
|
|
533
535
|
*/
|
|
534
536
|
const desugarRawAlias = (rawAlias) => "--" + desugarAlias(normalizeFlagName(rawAlias));
|
|
537
|
+
|
|
535
538
|
//#endregion
|
|
536
539
|
//#region src/find-config.ts
|
|
537
540
|
/**
|
|
@@ -573,11 +576,52 @@ const findConfig = async (opts) => {
|
|
|
573
576
|
}
|
|
574
577
|
return result.ok(results);
|
|
575
578
|
};
|
|
579
|
+
|
|
580
|
+
//#endregion
|
|
581
|
+
//#region src/merge-flags.ts
|
|
582
|
+
/**
|
|
583
|
+
* Merge CLI flags into a Stencil configuration object.
|
|
584
|
+
*
|
|
585
|
+
* This function applies command-line flags to the config, with CLI flags
|
|
586
|
+
* taking precedence over config file values. This is the canonical place
|
|
587
|
+
* where flag values are translated into config properties.?
|
|
588
|
+
*
|
|
589
|
+
* @param config The config object (from stencil.config.ts or empty)
|
|
590
|
+
* @param flags The parsed CLI flags
|
|
591
|
+
* @returns The config with flags merged in
|
|
592
|
+
*/
|
|
593
|
+
const mergeFlags = (config, flags) => {
|
|
594
|
+
const merged = { ...config };
|
|
595
|
+
if (flags.prod === true) merged.devMode = false;
|
|
596
|
+
else if (flags.dev === true) merged.devMode = true;
|
|
597
|
+
if (flags.debug === true || flags.verbose === true) merged.logLevel = "debug";
|
|
598
|
+
else if (flags.logLevel) merged.logLevel = flags.logLevel;
|
|
599
|
+
if (typeof flags.watch === "boolean") merged.watch = flags.watch;
|
|
600
|
+
if (typeof flags.docs === "boolean") merged.buildDocs = flags.docs;
|
|
601
|
+
if (typeof flags.esm === "boolean") merged.buildDist = flags.esm;
|
|
602
|
+
if (typeof flags.profile === "boolean") merged.profile = flags.profile;
|
|
603
|
+
if (typeof flags.log === "boolean") merged.writeLog = flags.log;
|
|
604
|
+
if (typeof flags.cache === "boolean") merged.enableCache = flags.cache;
|
|
605
|
+
if (typeof flags.ci === "boolean") merged.ci = flags.ci;
|
|
606
|
+
if (typeof flags.ssr === "boolean") merged.ssr = flags.ssr;
|
|
607
|
+
if (typeof flags.prerender === "boolean") merged.prerender = flags.prerender;
|
|
608
|
+
if (typeof flags.docsJson === "string") merged.docsJsonPath = flags.docsJson;
|
|
609
|
+
if (flags.stats) merged.statsJsonPath = flags.stats;
|
|
610
|
+
if (typeof flags.serviceWorker === "boolean") merged.generateServiceWorker = flags.serviceWorker;
|
|
611
|
+
if (typeof flags.e2e === "boolean") merged.e2eTests = flags.e2e;
|
|
612
|
+
if (typeof flags.maxWorkers === "number") merged.maxConcurrentWorkers = flags.maxWorkers;
|
|
613
|
+
if (typeof flags.address === "string") merged.devServerAddress = flags.address;
|
|
614
|
+
if (typeof flags.port === "number") merged.devServerPort = flags.port;
|
|
615
|
+
if (typeof flags.open === "boolean") merged.devServerOpen = flags.open;
|
|
616
|
+
return merged;
|
|
617
|
+
};
|
|
618
|
+
|
|
576
619
|
//#endregion
|
|
577
620
|
//#region src/load-compiler.ts
|
|
578
621
|
const loadCoreCompiler = async (sys) => {
|
|
579
622
|
return await sys.dynamicImport(sys.getCompilerExecutingPath());
|
|
580
623
|
};
|
|
624
|
+
|
|
581
625
|
//#endregion
|
|
582
626
|
//#region src/logs.ts
|
|
583
627
|
/**
|
|
@@ -661,44 +705,7 @@ const startupCompilerLog = (coreCompiler, config) => {
|
|
|
661
705
|
if (!config.enableCache) logger.warn(`Disabling cache during development will slow down incremental builds.`);
|
|
662
706
|
}
|
|
663
707
|
};
|
|
664
|
-
|
|
665
|
-
//#region src/merge-flags.ts
|
|
666
|
-
/**
|
|
667
|
-
* Merge CLI flags into a Stencil configuration object.
|
|
668
|
-
*
|
|
669
|
-
* This function applies command-line flags to the config, with CLI flags
|
|
670
|
-
* taking precedence over config file values. This is the canonical place
|
|
671
|
-
* where flag values are translated into config properties.?
|
|
672
|
-
*
|
|
673
|
-
* @param config The config object (from stencil.config.ts or empty)
|
|
674
|
-
* @param flags The parsed CLI flags
|
|
675
|
-
* @returns The config with flags merged in
|
|
676
|
-
*/
|
|
677
|
-
const mergeFlags = (config, flags) => {
|
|
678
|
-
const merged = { ...config };
|
|
679
|
-
if (flags.prod === true) merged.devMode = false;
|
|
680
|
-
else if (flags.dev === true) merged.devMode = true;
|
|
681
|
-
if (flags.debug === true || flags.verbose === true) merged.logLevel = "debug";
|
|
682
|
-
else if (flags.logLevel) merged.logLevel = flags.logLevel;
|
|
683
|
-
if (typeof flags.watch === "boolean") merged.watch = flags.watch;
|
|
684
|
-
if (typeof flags.docs === "boolean") merged.buildDocs = flags.docs;
|
|
685
|
-
if (typeof flags.esm === "boolean") merged.buildDist = flags.esm;
|
|
686
|
-
if (typeof flags.profile === "boolean") merged.profile = flags.profile;
|
|
687
|
-
if (typeof flags.log === "boolean") merged.writeLog = flags.log;
|
|
688
|
-
if (typeof flags.cache === "boolean") merged.enableCache = flags.cache;
|
|
689
|
-
if (typeof flags.ci === "boolean") merged.ci = flags.ci;
|
|
690
|
-
if (typeof flags.ssr === "boolean") merged.ssr = flags.ssr;
|
|
691
|
-
if (typeof flags.prerender === "boolean") merged.prerender = flags.prerender;
|
|
692
|
-
if (typeof flags.docsJson === "string") merged.docsJsonPath = flags.docsJson;
|
|
693
|
-
if (flags.stats) merged.statsJsonPath = flags.stats;
|
|
694
|
-
if (typeof flags.serviceWorker === "boolean") merged.generateServiceWorker = flags.serviceWorker;
|
|
695
|
-
if (typeof flags.e2e === "boolean") merged.e2eTests = flags.e2e;
|
|
696
|
-
if (typeof flags.maxWorkers === "number") merged.maxConcurrentWorkers = flags.maxWorkers;
|
|
697
|
-
if (typeof flags.address === "string") merged.devServerAddress = flags.address;
|
|
698
|
-
if (typeof flags.port === "number") merged.devServerPort = flags.port;
|
|
699
|
-
if (typeof flags.open === "boolean") merged.devServerOpen = flags.open;
|
|
700
|
-
return merged;
|
|
701
|
-
};
|
|
708
|
+
|
|
702
709
|
//#endregion
|
|
703
710
|
//#region src/check-version.ts
|
|
704
711
|
/**
|
|
@@ -725,6 +732,7 @@ const printCheckVersionResults = async (versionChecker) => {
|
|
|
725
732
|
if (isFunction(checkVersionResults)) checkVersionResults();
|
|
726
733
|
}
|
|
727
734
|
};
|
|
735
|
+
|
|
728
736
|
//#endregion
|
|
729
737
|
//#region src/task-prerender.ts
|
|
730
738
|
const taskPrerender = async (coreCompiler, config, flags) => {
|
|
@@ -753,6 +761,7 @@ const runPrerenderTask = async (coreCompiler, config, hydrateAppFilePath, compon
|
|
|
753
761
|
}
|
|
754
762
|
return diagnostics;
|
|
755
763
|
};
|
|
764
|
+
|
|
756
765
|
//#endregion
|
|
757
766
|
//#region src/task-watch.ts
|
|
758
767
|
const taskWatch = async (coreCompiler, config, flags) => {
|
|
@@ -770,7 +779,7 @@ const taskWatch = async (coreCompiler, config, flags) => {
|
|
|
770
779
|
}
|
|
771
780
|
config.sys.onProcessInterrupt(() => {
|
|
772
781
|
config.logger.debug(`close watch`);
|
|
773
|
-
|
|
782
|
+
compiler && compiler.destroy();
|
|
774
783
|
});
|
|
775
784
|
const rmVersionCheckerLog = watcher.on("buildFinish", async () => {
|
|
776
785
|
rmVersionCheckerLog();
|
|
@@ -792,6 +801,7 @@ const taskWatch = async (coreCompiler, config, flags) => {
|
|
|
792
801
|
if (devServer) await devServer.close();
|
|
793
802
|
if (exitCode > 0) return config.sys.exit(exitCode);
|
|
794
803
|
};
|
|
804
|
+
|
|
795
805
|
//#endregion
|
|
796
806
|
//#region src/telemetry/helpers.ts
|
|
797
807
|
const tryFn = async (fn, ...args) => {
|
|
@@ -802,7 +812,7 @@ const tryFn = async (fn, ...args) => {
|
|
|
802
812
|
};
|
|
803
813
|
const isInteractive = (sys, flags, object) => {
|
|
804
814
|
const terminalInfo = object || Object.freeze({
|
|
805
|
-
tty: sys.isTTY(),
|
|
815
|
+
tty: sys.isTTY() ? true : false,
|
|
806
816
|
ci: [
|
|
807
817
|
"CI",
|
|
808
818
|
"BUILD_ID",
|
|
@@ -828,7 +838,7 @@ function uuidv4() {
|
|
|
828
838
|
*/
|
|
829
839
|
async function readJson(sys, path) {
|
|
830
840
|
const file = await sys.readFile(path);
|
|
831
|
-
return file
|
|
841
|
+
return !!file && JSON.parse(file);
|
|
832
842
|
}
|
|
833
843
|
/**
|
|
834
844
|
* Does the command have the debug flag?
|
|
@@ -846,6 +856,7 @@ function hasDebug(flags) {
|
|
|
846
856
|
function hasVerbose(flags) {
|
|
847
857
|
return !!flags.verbose && hasDebug(flags);
|
|
848
858
|
}
|
|
859
|
+
|
|
849
860
|
//#endregion
|
|
850
861
|
//#region src/ionic-config.ts
|
|
851
862
|
const isTest$1 = () => process.env.JEST_WORKER_ID !== void 0;
|
|
@@ -902,6 +913,7 @@ async function updateConfig(sys, newOptions) {
|
|
|
902
913
|
const config = await readConfig(sys);
|
|
903
914
|
return await writeConfig(sys, Object.assign(config, newOptions));
|
|
904
915
|
}
|
|
916
|
+
|
|
905
917
|
//#endregion
|
|
906
918
|
//#region src/telemetry/shouldTrack.ts
|
|
907
919
|
/**
|
|
@@ -914,6 +926,7 @@ async function updateConfig(sys, newOptions) {
|
|
|
914
926
|
async function shouldTrack(sys, flags, ci) {
|
|
915
927
|
return !ci && isInteractive(sys, flags) && await checkTelemetry(sys);
|
|
916
928
|
}
|
|
929
|
+
|
|
917
930
|
//#endregion
|
|
918
931
|
//#region src/telemetry/telemetry.ts
|
|
919
932
|
/**
|
|
@@ -1109,7 +1122,7 @@ async function getInstalledPackages(sys, flags) {
|
|
|
1109
1122
|
}).filter(([k]) => k.startsWith("@stencil/") || k.startsWith("@ionic/") || k.startsWith("@capacitor/"));
|
|
1110
1123
|
try {
|
|
1111
1124
|
packages = yarn ? await yarnPackages(sys, ionicPackages) : await npmPackages(sys, ionicPackages);
|
|
1112
|
-
} catch {
|
|
1125
|
+
} catch (e) {
|
|
1113
1126
|
packages = ionicPackages.map(([k, v]) => `${k}@${v.replace("^", "")}`);
|
|
1114
1127
|
}
|
|
1115
1128
|
packagesNoVersions = ionicPackages.map(([k]) => `${k}`);
|
|
@@ -1118,7 +1131,7 @@ async function getInstalledPackages(sys, flags) {
|
|
|
1118
1131
|
packagesNoVersions
|
|
1119
1132
|
};
|
|
1120
1133
|
} catch (err) {
|
|
1121
|
-
|
|
1134
|
+
hasDebug(flags) && console.error(err);
|
|
1122
1135
|
return {
|
|
1123
1136
|
packages,
|
|
1124
1137
|
packagesNoVersions
|
|
@@ -1218,10 +1231,10 @@ async function sendTelemetry(sys, flags, data) {
|
|
|
1218
1231
|
headers: { "Content-Type": "application/json" },
|
|
1219
1232
|
body: JSON.stringify(body)
|
|
1220
1233
|
});
|
|
1221
|
-
|
|
1222
|
-
if (response.status !== 204
|
|
1234
|
+
hasVerbose(flags) && console.debug("\nSent %O metric to events service (status: %O)", data.name, response.status, "\n");
|
|
1235
|
+
if (response.status !== 204) hasVerbose(flags) && console.debug("\nBad response from events service. Request body: %O", response.body.toString(), "\n");
|
|
1223
1236
|
} catch (e) {
|
|
1224
|
-
|
|
1237
|
+
hasVerbose(flags) && console.debug("Telemetry request failed:", e);
|
|
1225
1238
|
}
|
|
1226
1239
|
}
|
|
1227
1240
|
/**
|
|
@@ -1261,6 +1274,7 @@ async function disableTelemetry(sys) {
|
|
|
1261
1274
|
function getMajorVersion(version) {
|
|
1262
1275
|
return version.split(".")[0];
|
|
1263
1276
|
}
|
|
1277
|
+
|
|
1264
1278
|
//#endregion
|
|
1265
1279
|
//#region src/task-build.ts
|
|
1266
1280
|
const taskBuild = async (coreCompiler, config, flags) => {
|
|
@@ -1289,6 +1303,7 @@ const taskBuild = async (coreCompiler, config, flags) => {
|
|
|
1289
1303
|
}
|
|
1290
1304
|
if (exitCode > 0) return config.sys.exit(exitCode);
|
|
1291
1305
|
};
|
|
1306
|
+
|
|
1292
1307
|
//#endregion
|
|
1293
1308
|
//#region src/task-docs.ts
|
|
1294
1309
|
const taskDocs = async (coreCompiler, config) => {
|
|
@@ -1300,6 +1315,7 @@ const taskDocs = async (coreCompiler, config) => {
|
|
|
1300
1315
|
await compiler.build();
|
|
1301
1316
|
await compiler.destroy();
|
|
1302
1317
|
};
|
|
1318
|
+
|
|
1303
1319
|
//#endregion
|
|
1304
1320
|
//#region src/task-generate.ts
|
|
1305
1321
|
/**
|
|
@@ -1336,8 +1352,8 @@ const taskGenerate = async (config, flags) => {
|
|
|
1336
1352
|
return config.sys.exit(1);
|
|
1337
1353
|
}
|
|
1338
1354
|
let cssExtension = "css";
|
|
1339
|
-
if (config.plugins
|
|
1340
|
-
else if (config.plugins
|
|
1355
|
+
if (!!config.plugins.find((plugin) => plugin.name === "sass")) cssExtension = await chooseSassExtension();
|
|
1356
|
+
else if (!!config.plugins.find((plugin) => plugin.name === "less")) cssExtension = "less";
|
|
1341
1357
|
const filesToGenerateExt = await chooseFilesToGenerate(cssExtension);
|
|
1342
1358
|
if (!filesToGenerateExt) return;
|
|
1343
1359
|
const extensionsToGenerate = ["tsx", ...filesToGenerateExt];
|
|
@@ -1572,6 +1588,7 @@ describe('${tagName}', () => {
|
|
|
1572
1588
|
* @returns the converted input as pascal case
|
|
1573
1589
|
*/
|
|
1574
1590
|
const toPascalCase = (str) => str.split("-").reduce((res, part) => res + part[0].toUpperCase() + part.slice(1), "");
|
|
1591
|
+
|
|
1575
1592
|
//#endregion
|
|
1576
1593
|
//#region src/task-telemetry.ts
|
|
1577
1594
|
/**
|
|
@@ -1590,13 +1607,11 @@ const taskTelemetry = async (flags, sys, logger) => {
|
|
|
1590
1607
|
const DISABLED_MESSAGE = `${logger.red("Disabled")}\n\n`;
|
|
1591
1608
|
const hasTelemetry = await checkTelemetry(sys);
|
|
1592
1609
|
if (isEnabling) {
|
|
1593
|
-
|
|
1594
|
-
else console.log(`Something went wrong when enabling Telemetry.`);
|
|
1610
|
+
await enableTelemetry(sys) ? console.log(`\n ${logger.bold("Telemetry is now ") + ENABLED_MESSAGE}`) : console.log(`Something went wrong when enabling Telemetry.`);
|
|
1595
1611
|
return;
|
|
1596
1612
|
}
|
|
1597
1613
|
if (isDisabling) {
|
|
1598
|
-
|
|
1599
|
-
else console.log(`Something went wrong when disabling Telemetry.`);
|
|
1614
|
+
await disableTelemetry(sys) ? console.log(`\n ${logger.bold("Telemetry is now ") + DISABLED_MESSAGE}`) : console.log(`Something went wrong when disabling Telemetry.`);
|
|
1600
1615
|
return;
|
|
1601
1616
|
}
|
|
1602
1617
|
console.log(` ${logger.bold("Telemetry:")} ${logger.dim(INFORMATION)}`);
|
|
@@ -1607,6 +1622,7 @@ const taskTelemetry = async (flags, sys, logger) => {
|
|
|
1607
1622
|
${logger.cyan("on")} ${logger.dim("..............")} Enable sharing anonymous usage data
|
|
1608
1623
|
`);
|
|
1609
1624
|
};
|
|
1625
|
+
|
|
1610
1626
|
//#endregion
|
|
1611
1627
|
//#region src/task-help.ts
|
|
1612
1628
|
/**
|
|
@@ -1659,6 +1675,7 @@ const taskHelp = async (flags, logger, sys) => {
|
|
|
1659
1675
|
${prompt} ${logger.green("stencil g my-component")}
|
|
1660
1676
|
`);
|
|
1661
1677
|
};
|
|
1678
|
+
|
|
1662
1679
|
//#endregion
|
|
1663
1680
|
//#region src/task-info.ts
|
|
1664
1681
|
/**
|
|
@@ -1684,6 +1701,7 @@ const taskInfo = (coreCompiler, sys, logger) => {
|
|
|
1684
1701
|
console.log(`${logger.cyan(" Terser:")} ${versions.terser}`);
|
|
1685
1702
|
console.log(``);
|
|
1686
1703
|
};
|
|
1704
|
+
|
|
1687
1705
|
//#endregion
|
|
1688
1706
|
//#region src/task-serve.ts
|
|
1689
1707
|
const taskServe = async (config, flags) => {
|
|
@@ -1708,6 +1726,7 @@ const taskServe = async (config, flags) => {
|
|
|
1708
1726
|
}
|
|
1709
1727
|
});
|
|
1710
1728
|
};
|
|
1729
|
+
|
|
1711
1730
|
//#endregion
|
|
1712
1731
|
//#region src/run.ts
|
|
1713
1732
|
/**
|
|
@@ -1828,5 +1847,6 @@ const runTask = async (coreCompiler, config, task, sys, flags) => {
|
|
|
1828
1847
|
return configWithFlags.sys.exit(1);
|
|
1829
1848
|
}
|
|
1830
1849
|
};
|
|
1850
|
+
|
|
1831
1851
|
//#endregion
|
|
1832
|
-
export { BOOLEAN_CLI_FLAGS, createConfigFlags, parseFlags, run, runTask };
|
|
1852
|
+
export { BOOLEAN_CLI_FLAGS, createConfigFlags, parseFlags, run, runTask };
|
package/package.json
CHANGED
|
@@ -1,32 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/cli",
|
|
3
|
-
"version": "5.0.0-alpha.1",
|
|
4
3
|
"description": "CLI for Stencil - Web component compiler",
|
|
4
|
+
"author": "StencilJs Contributors",
|
|
5
|
+
"homepage": "https://stenciljs.com/",
|
|
5
6
|
"keywords": [
|
|
7
|
+
"web components",
|
|
6
8
|
"components",
|
|
7
|
-
"
|
|
9
|
+
"stencil",
|
|
8
10
|
"ionic",
|
|
9
|
-
"
|
|
11
|
+
"webapp",
|
|
12
|
+
"custom elements",
|
|
10
13
|
"pwa",
|
|
11
|
-
"
|
|
12
|
-
"web components",
|
|
13
|
-
"webapp"
|
|
14
|
+
"progressive web app"
|
|
14
15
|
],
|
|
15
|
-
"
|
|
16
|
-
"license": "MIT",
|
|
17
|
-
"author": "StencilJs Contributors",
|
|
16
|
+
"version": "5.0.0-next.0",
|
|
18
17
|
"repository": {
|
|
19
18
|
"type": "git",
|
|
20
19
|
"url": "git+https://github.com/stenciljs/core.git"
|
|
21
20
|
},
|
|
22
|
-
"bin": {
|
|
23
|
-
"stencil": "./bin/stencil.mjs"
|
|
24
|
-
},
|
|
25
|
-
"files": [
|
|
26
|
-
"bin/",
|
|
27
|
-
"dist/"
|
|
28
|
-
],
|
|
29
21
|
"type": "module",
|
|
22
|
+
"license": "MIT",
|
|
30
23
|
"main": "./dist/index.mjs",
|
|
31
24
|
"types": "./dist/index.d.mts",
|
|
32
25
|
"exports": {
|
|
@@ -36,22 +29,26 @@
|
|
|
36
29
|
},
|
|
37
30
|
"./cli": "./bin/stencil.mjs"
|
|
38
31
|
},
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"@stencil/dev-server": "5.0.0-alpha.1"
|
|
42
|
-
},
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"tsdown": "^0.21.6",
|
|
45
|
-
"typescript": "~6.0.2",
|
|
46
|
-
"vitest": "^4.1.1",
|
|
47
|
-
"@stencil/core": "5.0.0-alpha.1"
|
|
32
|
+
"bin": {
|
|
33
|
+
"stencil": "./bin/stencil.mjs"
|
|
48
34
|
},
|
|
35
|
+
"files": [
|
|
36
|
+
"bin/",
|
|
37
|
+
"dist/"
|
|
38
|
+
],
|
|
49
39
|
"peerDependencies": {
|
|
50
|
-
"@stencil/core": "^5.0.0
|
|
40
|
+
"@stencil/core": "^5.0.0"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@stencil/core": "5.0.0-next.0"
|
|
51
44
|
},
|
|
52
45
|
"volta": {
|
|
53
46
|
"extends": "../../package.json"
|
|
54
47
|
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"prompts": "^2.4.2",
|
|
50
|
+
"@stencil/dev-server": "5.0.0-next.0"
|
|
51
|
+
},
|
|
55
52
|
"scripts": {
|
|
56
53
|
"build": "tsdown",
|
|
57
54
|
"test": "vitest run",
|