mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-08-10 06:29:46 +08:00
feat(cli): improve error handling
This commit is contained in:
parent
187b72483c
commit
f7ef1845e8
@ -56,11 +56,10 @@ async function compileDir(dir: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function buildESModuleOutputs() {
|
async function buildESModuleOutputs() {
|
||||||
await copy(SRC_DIR, ES_DIR);
|
|
||||||
|
|
||||||
stepper.start('Build ESModule Outputs');
|
stepper.start('Build ESModule Outputs');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
await copy(SRC_DIR, ES_DIR);
|
||||||
setModuleEnv('esmodule');
|
setModuleEnv('esmodule');
|
||||||
await compileDir(ES_DIR);
|
await compileDir(ES_DIR);
|
||||||
stepper.success('Build ESModule Outputs');
|
stepper.success('Build ESModule Outputs');
|
||||||
@ -70,11 +69,10 @@ async function buildESModuleOutputs() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function buildCommonjsOutputs() {
|
async function buildCommonjsOutputs() {
|
||||||
await copy(SRC_DIR, LIB_DIR);
|
|
||||||
|
|
||||||
stepper.start('Build Commonjs Outputs');
|
stepper.start('Build Commonjs Outputs');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
await copy(SRC_DIR, LIB_DIR);
|
||||||
setModuleEnv('commonjs');
|
setModuleEnv('commonjs');
|
||||||
await compileDir(LIB_DIR);
|
await compileDir(LIB_DIR);
|
||||||
stepper.success('Build Commonjs Outputs');
|
stepper.success('Build Commonjs Outputs');
|
||||||
@ -84,10 +82,10 @@ async function buildCommonjsOutputs() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function buildStyleEntry() {
|
async function buildStyleEntry() {
|
||||||
await genStyleDepsMap();
|
|
||||||
|
|
||||||
stepper.start('Build Style Entry');
|
stepper.start('Build Style Entry');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
await genStyleDepsMap();
|
||||||
genComponentStyle();
|
genComponentStyle();
|
||||||
stepper.success('Build Style Entry');
|
stepper.success('Build Style Entry');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -22,7 +22,10 @@ export class VantCliSitePlugin {
|
|||||||
genSiteDesktopShared();
|
genSiteDesktopShared();
|
||||||
resolve();
|
resolve();
|
||||||
})
|
})
|
||||||
.catch(reject);
|
.catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
reject(err);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user