Skip to content

Commit

Permalink
feat: use spawn to build esm
Browse files Browse the repository at this point in the history
  • Loading branch information
leezng committed Mar 4, 2024
1 parent e37573a commit a32896a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules/
example-dist/
dist/
lib/
esm/
types/
npm-debug.log*
yarn-debug.log*
Expand Down
8 changes: 8 additions & 0 deletions build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ webpack(webpackConfig, (err, stats) => {
),
);
} else {
const buildEsmProcess = spawn('npm', ['run', 'build:esm'], {
stdio: 'inherit',
});

buildEsmProcess.on('close', () => {
console.log(chalk.cyan('Build esm complete.\n'));
});

const buildTypesProcess = spawn('npm', ['run', 'build:dts'], {
stdio: 'inherit',
});
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
],
"files": [
"lib",
"esm",
"types"
],
"peerDependencies": {
Expand Down

0 comments on commit a32896a

Please sign in to comment.