Skip to content

Commit 28c5db0

Browse files
committed
refactor: simplify with Rollup config file
1 parent 62fc67c commit 28c5db0

File tree

3 files changed

+12
-20
lines changed

3 files changed

+12
-20
lines changed

constructor/build.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"license": "MIT",
2424
"scripts": {
2525
"test": "node test/run.js",
26-
"prepublishOnly": "node constructor/build.js"
26+
"build": "rollup -c",
27+
"prepublishOnly": "npm run build"
2728
},
2829
"peerDependencies": {
2930
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"

rollup.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export default {
2+
input: "index.js",
3+
external: ["acorn"],
4+
output: {
5+
file: "index.cjs",
6+
exports: 'default',
7+
format: "cjs",
8+
banner: "// DO NOT edit this file, it's auto-generated from 'rollup.config.js'; any changes will be overwritten. \n"
9+
}
10+
};

0 commit comments

Comments
 (0)