Skip to content

Commit

Permalink
feat(stan-builder): add compile time
Browse files Browse the repository at this point in the history
  • Loading branch information
fupengl committed May 17, 2022
1 parent a364f91 commit 1f9d1e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/stan-builder/src/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
rimraf,
multimatch,
CopyTarget,
pms,
} from 'stan-utils';

import getStanConfig from './get-stan-config';
Expand Down Expand Up @@ -66,9 +67,10 @@ async function builder(opts: BuildOptions) {
}
} catch (e) {}

const start = Date.now();

for (const bundleOpt of bundleOptions) {
const { bundler = 'rollup', entry, esm, umd, cjs, system, copy } = bundleOpt;

const isBabel = (b: BundleOptions['esm'] | BundleOptions['cjs']) =>
b === 'babel' || (b as BaseBundleOptions)?.bundler === 'babel' || bundler === 'babel';

Expand Down Expand Up @@ -163,7 +165,7 @@ async function builder(opts: BuildOptions) {
}

if (!watch) {
console.log(chalk.cyan('Build complete.'));
console.log(chalk.cyan(`Build complete ${pms(Date.now() - start)}.`));
}
return;
}
Expand Down

0 comments on commit 1f9d1e8

Please sign in to comment.