@storm-software/unbuild 0.57.11 → 0.57.13
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 +1 -1
- package/bin/unbuild.cjs +39 -101
- package/bin/unbuild.js +40 -102
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
package/bin/unbuild.cjs
CHANGED
|
@@ -2930,124 +2930,62 @@ async function createProgram(config) {
|
|
|
2930
2930
|
const program = new import_commander.Command("storm-unbuild");
|
|
2931
2931
|
program.version("1.0.0", "-v --version", "display CLI version");
|
|
2932
2932
|
program.description("\u26A1 Run the Storm Unbuild pipeline").showHelpAfterError().showSuggestionAfterError();
|
|
2933
|
-
|
|
2933
|
+
program.command("build", { isDefault: true }).alias("bundle").description("Run a TypeScript build using Unbuild.").option("-n --name <value>", "The name of the project to build").option(
|
|
2934
2934
|
"-p --project-root <path>",
|
|
2935
2935
|
"The path to the root of the project to build. This path is defined relative to the workspace root."
|
|
2936
|
-
).
|
|
2937
|
-
const sourceRootOption = new import_commander.Option(
|
|
2936
|
+
).option(
|
|
2938
2937
|
"-s --source-root <path>",
|
|
2939
2938
|
"The path of the project's source folder to build"
|
|
2940
|
-
)
|
|
2941
|
-
const nameOption = new import_commander.Option(
|
|
2942
|
-
"-n --name <value>",
|
|
2943
|
-
"The name of the project to build"
|
|
2944
|
-
);
|
|
2945
|
-
const outputPathOption = new import_commander.Option(
|
|
2939
|
+
).option(
|
|
2946
2940
|
"-o --output-path <path>",
|
|
2947
|
-
"The path of the project's source folder to build"
|
|
2948
|
-
|
|
2949
|
-
|
|
2941
|
+
"The path of the project's source folder to build",
|
|
2942
|
+
"dist/{projectRoot}"
|
|
2943
|
+
).option(
|
|
2950
2944
|
"-p --platform <value>",
|
|
2951
|
-
"The platform to build the distribution for"
|
|
2952
|
-
|
|
2953
|
-
|
|
2945
|
+
"The platform to build the distribution for",
|
|
2946
|
+
"node"
|
|
2947
|
+
).option(
|
|
2954
2948
|
"-f, --format <value...>",
|
|
2955
|
-
"The format to build the distribution in"
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2949
|
+
"The format to build the distribution in",
|
|
2950
|
+
(value, previous) => {
|
|
2951
|
+
if (previous === void 0) {
|
|
2952
|
+
return [value];
|
|
2953
|
+
} else if (Array.isArray(previous) && !previous.includes(value)) {
|
|
2954
|
+
previous.push(value);
|
|
2955
|
+
}
|
|
2956
|
+
return previous;
|
|
2957
|
+
},
|
|
2958
|
+
["esm"]
|
|
2959
|
+
).option(
|
|
2960
|
+
"-t --target <value>",
|
|
2961
|
+
"The target to build the distribution for",
|
|
2962
|
+
"ESNext"
|
|
2963
|
+
).option("-b --bundle", "Should the output be bundled", true).option("--no-bundle", "Should the output be bundled").option(
|
|
2965
2964
|
"-c --clean",
|
|
2966
|
-
"Should the output directory be cleaned before building"
|
|
2967
|
-
|
|
2968
|
-
|
|
2965
|
+
"Should the output directory be cleaned before building",
|
|
2966
|
+
true
|
|
2967
|
+
).option(
|
|
2969
2968
|
"--no-clean",
|
|
2970
2969
|
"Should the output directory be cleaned before building"
|
|
2971
|
-
).
|
|
2972
|
-
const bundleOption = new import_commander.Option(
|
|
2973
|
-
"-b --bundle",
|
|
2974
|
-
"Should the output be bundled"
|
|
2975
|
-
).default(true);
|
|
2976
|
-
const noBundleOption = new import_commander.Option(
|
|
2977
|
-
"--no-bundle",
|
|
2978
|
-
"Should the output be bundled"
|
|
2979
|
-
).default(false);
|
|
2980
|
-
const targetOption = new import_commander.Option(
|
|
2981
|
-
"-t --target <value>",
|
|
2982
|
-
"The target to build the distribution for"
|
|
2983
|
-
).choices([
|
|
2984
|
-
"ESNext",
|
|
2985
|
-
"ES2015",
|
|
2986
|
-
"ES2016",
|
|
2987
|
-
"ES2017",
|
|
2988
|
-
"ES2018",
|
|
2989
|
-
"ES2019",
|
|
2990
|
-
"ES2020",
|
|
2991
|
-
"ES2021",
|
|
2992
|
-
"ES2022",
|
|
2993
|
-
"ES2023"
|
|
2994
|
-
]).default("ESNext");
|
|
2995
|
-
const watchOption = new import_commander.Option(
|
|
2996
|
-
"-w --watch",
|
|
2997
|
-
"Should the build process watch for changes"
|
|
2998
|
-
).default(false);
|
|
2999
|
-
const debugOption = new import_commander.Option(
|
|
3000
|
-
"-d --debug",
|
|
3001
|
-
"Should the build process run in debug mode"
|
|
3002
|
-
).default(false);
|
|
3003
|
-
const bannerOption = new import_commander.Option(
|
|
3004
|
-
"--banner <value>",
|
|
3005
|
-
"The banner to prepend to the output"
|
|
3006
|
-
);
|
|
3007
|
-
const footerOption = new import_commander.Option(
|
|
3008
|
-
"--footer <value>",
|
|
3009
|
-
"The footer to prepend to the output"
|
|
3010
|
-
);
|
|
3011
|
-
const splittingOption = new import_commander.Option(
|
|
2970
|
+
).option("-w --watch", "Should the build process watch for changes").option("-d --debug", "Should the build process run in debug mode").option("--banner <value>", "The banner to prepend to the output").option("--footer <value>", "The footer to prepend to the output").option(
|
|
3012
2971
|
"--splitting",
|
|
3013
|
-
"Should the output be split into multiple files"
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
"--tree-shaking",
|
|
3017
|
-
"Should tree shaking be enabled"
|
|
3018
|
-
).default(true);
|
|
3019
|
-
const generatePackageJsonOption = new import_commander.Option(
|
|
2972
|
+
"Should the output be split into multiple files",
|
|
2973
|
+
true
|
|
2974
|
+
).option("--tree-shaking", "Should tree shaking be enabled", true).option(
|
|
3020
2975
|
"--generate-package-json",
|
|
3021
|
-
"Should a package.json be generated for the output"
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
"--emit-on-all",
|
|
3025
|
-
"Should the output be emitted on all platforms"
|
|
3026
|
-
).default(false);
|
|
3027
|
-
const metafileOption = new import_commander.Option(
|
|
2976
|
+
"Should a package.json be generated for the output",
|
|
2977
|
+
true
|
|
2978
|
+
).option("--emit-on-all", "Should the output be emitted on all platforms").option(
|
|
3028
2979
|
"--metafile",
|
|
3029
|
-
"Should a metafile be generated for the output"
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
"--minify",
|
|
3033
|
-
"Should the output be minified"
|
|
3034
|
-
).default(true);
|
|
3035
|
-
const includeSrcOption = new import_commander.Option(
|
|
2980
|
+
"Should a metafile be generated for the output",
|
|
2981
|
+
true
|
|
2982
|
+
).option("--minify", "Should the output be minified", true).option(
|
|
3036
2983
|
"--include-src",
|
|
3037
2984
|
"Should the source files be included in the output"
|
|
3038
|
-
).
|
|
3039
|
-
const verboseOption = new import_commander.Option(
|
|
3040
|
-
"--verbose",
|
|
3041
|
-
"Should the build process be verbose"
|
|
3042
|
-
).default(false);
|
|
3043
|
-
const dtsOption = new import_commander.Option(
|
|
3044
|
-
"--emit-types",
|
|
3045
|
-
"Should types be emitted for the output"
|
|
3046
|
-
).default(true);
|
|
3047
|
-
program.command("build", { isDefault: true }).alias("bundle").description("Run a TypeScript build using Unbuild.").addOption(nameOption).addOption(projectRootOption).addOption(sourceRootOption).addOption(outputPathOption).addOption(platformOption).addOption(formatOption).addOption(targetOption).addOption(bundleOption).addOption(noBundleOption).addOption(cleanOption).addOption(noCleanOption).addOption(watchOption).addOption(debugOption).addOption(bannerOption).addOption(footerOption).addOption(splittingOption).addOption(treeShakingOption).addOption(generatePackageJsonOption).addOption(emitOnAllOption).addOption(metafileOption).addOption(minifyOption).addOption(includeSrcOption).addOption(verboseOption).addOption(dtsOption).action(buildAction(config));
|
|
2985
|
+
).option("--verbose", "Should the build process be verbose").option("--emit-types", "Should types be emitted for the output", true).action(buildAction(config));
|
|
3048
2986
|
program.command("clean").alias("clear").description(
|
|
3049
2987
|
"Clean the output directory of the project. This command will remove the 'dist' folder."
|
|
3050
|
-
).
|
|
2988
|
+
).option("-n --name <value>", "The name of the project to clean").action(cleanAction(config));
|
|
3051
2989
|
return program;
|
|
3052
2990
|
} catch (e) {
|
|
3053
2991
|
writeFatal(
|
package/bin/unbuild.js
CHANGED
|
@@ -2010,7 +2010,7 @@ function getConfig(workspaceRoot, skipLogs = false) {
|
|
|
2010
2010
|
}
|
|
2011
2011
|
|
|
2012
2012
|
// bin/unbuild.ts
|
|
2013
|
-
import { Command
|
|
2013
|
+
import { Command } from "commander";
|
|
2014
2014
|
|
|
2015
2015
|
// src/build.ts
|
|
2016
2016
|
import {
|
|
@@ -2929,124 +2929,62 @@ async function createProgram(config) {
|
|
|
2929
2929
|
const program = new Command("storm-unbuild");
|
|
2930
2930
|
program.version("1.0.0", "-v --version", "display CLI version");
|
|
2931
2931
|
program.description("\u26A1 Run the Storm Unbuild pipeline").showHelpAfterError().showSuggestionAfterError();
|
|
2932
|
-
|
|
2932
|
+
program.command("build", { isDefault: true }).alias("bundle").description("Run a TypeScript build using Unbuild.").option("-n --name <value>", "The name of the project to build").option(
|
|
2933
2933
|
"-p --project-root <path>",
|
|
2934
2934
|
"The path to the root of the project to build. This path is defined relative to the workspace root."
|
|
2935
|
-
).
|
|
2936
|
-
const sourceRootOption = new Option(
|
|
2935
|
+
).option(
|
|
2937
2936
|
"-s --source-root <path>",
|
|
2938
2937
|
"The path of the project's source folder to build"
|
|
2939
|
-
)
|
|
2940
|
-
const nameOption = new Option(
|
|
2941
|
-
"-n --name <value>",
|
|
2942
|
-
"The name of the project to build"
|
|
2943
|
-
);
|
|
2944
|
-
const outputPathOption = new Option(
|
|
2938
|
+
).option(
|
|
2945
2939
|
"-o --output-path <path>",
|
|
2946
|
-
"The path of the project's source folder to build"
|
|
2947
|
-
|
|
2948
|
-
|
|
2940
|
+
"The path of the project's source folder to build",
|
|
2941
|
+
"dist/{projectRoot}"
|
|
2942
|
+
).option(
|
|
2949
2943
|
"-p --platform <value>",
|
|
2950
|
-
"The platform to build the distribution for"
|
|
2951
|
-
|
|
2952
|
-
|
|
2944
|
+
"The platform to build the distribution for",
|
|
2945
|
+
"node"
|
|
2946
|
+
).option(
|
|
2953
2947
|
"-f, --format <value...>",
|
|
2954
|
-
"The format to build the distribution in"
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2948
|
+
"The format to build the distribution in",
|
|
2949
|
+
(value, previous) => {
|
|
2950
|
+
if (previous === void 0) {
|
|
2951
|
+
return [value];
|
|
2952
|
+
} else if (Array.isArray(previous) && !previous.includes(value)) {
|
|
2953
|
+
previous.push(value);
|
|
2954
|
+
}
|
|
2955
|
+
return previous;
|
|
2956
|
+
},
|
|
2957
|
+
["esm"]
|
|
2958
|
+
).option(
|
|
2959
|
+
"-t --target <value>",
|
|
2960
|
+
"The target to build the distribution for",
|
|
2961
|
+
"ESNext"
|
|
2962
|
+
).option("-b --bundle", "Should the output be bundled", true).option("--no-bundle", "Should the output be bundled").option(
|
|
2964
2963
|
"-c --clean",
|
|
2965
|
-
"Should the output directory be cleaned before building"
|
|
2966
|
-
|
|
2967
|
-
|
|
2964
|
+
"Should the output directory be cleaned before building",
|
|
2965
|
+
true
|
|
2966
|
+
).option(
|
|
2968
2967
|
"--no-clean",
|
|
2969
2968
|
"Should the output directory be cleaned before building"
|
|
2970
|
-
).
|
|
2971
|
-
const bundleOption = new Option(
|
|
2972
|
-
"-b --bundle",
|
|
2973
|
-
"Should the output be bundled"
|
|
2974
|
-
).default(true);
|
|
2975
|
-
const noBundleOption = new Option(
|
|
2976
|
-
"--no-bundle",
|
|
2977
|
-
"Should the output be bundled"
|
|
2978
|
-
).default(false);
|
|
2979
|
-
const targetOption = new Option(
|
|
2980
|
-
"-t --target <value>",
|
|
2981
|
-
"The target to build the distribution for"
|
|
2982
|
-
).choices([
|
|
2983
|
-
"ESNext",
|
|
2984
|
-
"ES2015",
|
|
2985
|
-
"ES2016",
|
|
2986
|
-
"ES2017",
|
|
2987
|
-
"ES2018",
|
|
2988
|
-
"ES2019",
|
|
2989
|
-
"ES2020",
|
|
2990
|
-
"ES2021",
|
|
2991
|
-
"ES2022",
|
|
2992
|
-
"ES2023"
|
|
2993
|
-
]).default("ESNext");
|
|
2994
|
-
const watchOption = new Option(
|
|
2995
|
-
"-w --watch",
|
|
2996
|
-
"Should the build process watch for changes"
|
|
2997
|
-
).default(false);
|
|
2998
|
-
const debugOption = new Option(
|
|
2999
|
-
"-d --debug",
|
|
3000
|
-
"Should the build process run in debug mode"
|
|
3001
|
-
).default(false);
|
|
3002
|
-
const bannerOption = new Option(
|
|
3003
|
-
"--banner <value>",
|
|
3004
|
-
"The banner to prepend to the output"
|
|
3005
|
-
);
|
|
3006
|
-
const footerOption = new Option(
|
|
3007
|
-
"--footer <value>",
|
|
3008
|
-
"The footer to prepend to the output"
|
|
3009
|
-
);
|
|
3010
|
-
const splittingOption = new Option(
|
|
2969
|
+
).option("-w --watch", "Should the build process watch for changes").option("-d --debug", "Should the build process run in debug mode").option("--banner <value>", "The banner to prepend to the output").option("--footer <value>", "The footer to prepend to the output").option(
|
|
3011
2970
|
"--splitting",
|
|
3012
|
-
"Should the output be split into multiple files"
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
"--tree-shaking",
|
|
3016
|
-
"Should tree shaking be enabled"
|
|
3017
|
-
).default(true);
|
|
3018
|
-
const generatePackageJsonOption = new Option(
|
|
2971
|
+
"Should the output be split into multiple files",
|
|
2972
|
+
true
|
|
2973
|
+
).option("--tree-shaking", "Should tree shaking be enabled", true).option(
|
|
3019
2974
|
"--generate-package-json",
|
|
3020
|
-
"Should a package.json be generated for the output"
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
"--emit-on-all",
|
|
3024
|
-
"Should the output be emitted on all platforms"
|
|
3025
|
-
).default(false);
|
|
3026
|
-
const metafileOption = new Option(
|
|
2975
|
+
"Should a package.json be generated for the output",
|
|
2976
|
+
true
|
|
2977
|
+
).option("--emit-on-all", "Should the output be emitted on all platforms").option(
|
|
3027
2978
|
"--metafile",
|
|
3028
|
-
"Should a metafile be generated for the output"
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
"--minify",
|
|
3032
|
-
"Should the output be minified"
|
|
3033
|
-
).default(true);
|
|
3034
|
-
const includeSrcOption = new Option(
|
|
2979
|
+
"Should a metafile be generated for the output",
|
|
2980
|
+
true
|
|
2981
|
+
).option("--minify", "Should the output be minified", true).option(
|
|
3035
2982
|
"--include-src",
|
|
3036
2983
|
"Should the source files be included in the output"
|
|
3037
|
-
).
|
|
3038
|
-
const verboseOption = new Option(
|
|
3039
|
-
"--verbose",
|
|
3040
|
-
"Should the build process be verbose"
|
|
3041
|
-
).default(false);
|
|
3042
|
-
const dtsOption = new Option(
|
|
3043
|
-
"--emit-types",
|
|
3044
|
-
"Should types be emitted for the output"
|
|
3045
|
-
).default(true);
|
|
3046
|
-
program.command("build", { isDefault: true }).alias("bundle").description("Run a TypeScript build using Unbuild.").addOption(nameOption).addOption(projectRootOption).addOption(sourceRootOption).addOption(outputPathOption).addOption(platformOption).addOption(formatOption).addOption(targetOption).addOption(bundleOption).addOption(noBundleOption).addOption(cleanOption).addOption(noCleanOption).addOption(watchOption).addOption(debugOption).addOption(bannerOption).addOption(footerOption).addOption(splittingOption).addOption(treeShakingOption).addOption(generatePackageJsonOption).addOption(emitOnAllOption).addOption(metafileOption).addOption(minifyOption).addOption(includeSrcOption).addOption(verboseOption).addOption(dtsOption).action(buildAction(config));
|
|
2984
|
+
).option("--verbose", "Should the build process be verbose").option("--emit-types", "Should types be emitted for the output", true).action(buildAction(config));
|
|
3047
2985
|
program.command("clean").alias("clear").description(
|
|
3048
2986
|
"Clean the output directory of the project. This command will remove the 'dist' folder."
|
|
3049
|
-
).
|
|
2987
|
+
).option("-n --name <value>", "The name of the project to clean").action(cleanAction(config));
|
|
3050
2988
|
return program;
|
|
3051
2989
|
} catch (e) {
|
|
3052
2990
|
writeFatal(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/unbuild",
|
|
3
|
-
"version": "0.57.
|
|
3
|
+
"version": "0.57.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing `unbuild` utilities for building Storm Software libraries and applications",
|
|
6
6
|
"repository": {
|
|
@@ -147,9 +147,9 @@
|
|
|
147
147
|
"typescript": { "optional": false }
|
|
148
148
|
},
|
|
149
149
|
"dependencies": {
|
|
150
|
-
"@storm-software/build-tools": "^0.158.
|
|
151
|
-
"@storm-software/config": "^1.134.
|
|
152
|
-
"@storm-software/config-tools": "^1.188.
|
|
150
|
+
"@storm-software/build-tools": "^0.158.13",
|
|
151
|
+
"@storm-software/config": "^1.134.13",
|
|
152
|
+
"@storm-software/config-tools": "^1.188.13",
|
|
153
153
|
"commander": "^12.1.0",
|
|
154
154
|
"defu": "6.1.4",
|
|
155
155
|
"esbuild": "^0.25.0",
|
|
@@ -171,5 +171,5 @@
|
|
|
171
171
|
},
|
|
172
172
|
"publishConfig": { "access": "public" },
|
|
173
173
|
"sideEffects": false,
|
|
174
|
-
"gitHead": "
|
|
174
|
+
"gitHead": "029d9e5632710490198e9fac989e7aa85b9dd1b9"
|
|
175
175
|
}
|