Skip to content

Commit e593a0b

Browse files
committed
[build] Faster prod build for demo testing
1 parent 1e36016 commit e593a0b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

gulpfile.mjs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -720,16 +720,18 @@ export const ts = async () => {
720720
await tsCheck('site');
721721
};
722722

723-
export const compileForProd = async () => {
723+
export const compileForProdFast = async () => await compileForProd(true);
724+
725+
export const compileForProd = async (fast = false) => {
724726
await clearDir(DIST_DIR);
725727
await copyPackageFiles(true);
726728
await copyDefinitions(DIST_DIR);
727729

728730
await allOf(
729-
[undefined, 'cjs', 'umd'],
731+
[undefined, 'umd', ...(fast ? [] : ['cjs'])],
730732
async (format) =>
731733
await allOf(
732-
[undefined, 'es6'],
734+
[undefined, ...(fast ? [] : ['es6'])],
733735
async (target) =>
734736
await allModules(
735737
async (module) =>

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
"preparePackage": "gulp preparePackage",
107107
"compileForTest": "gulp compileForTest",
108108
"compileForProd": "gulp compileForProd",
109+
"compileForProdFast": "gulp compileForProdFast",
109110
"testUnit": "gulp testUnit",
110111
"compileAndTestUnit": "gulp compileAndTestUnit",
111112
"testUnitFast": "gulp testUnitFast",

0 commit comments

Comments
 (0)