Skip to content

Commit e9acfc1

Browse files
🔨 config(build): Use microbundle instead of @babel/cli.
1 parent d116935 commit e9acfc1

File tree

4 files changed

+1632
-816
lines changed

4 files changed

+1632
-816
lines changed

.codeclimate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
exclude_patterns:
22
- doc/**
3-
- lib/**
3+
- dist/**
44
- test/**

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
!yarn.lock
33

44
# Generated files
5-
/lib
5+
/dist
66

77
# Dependency directory
88
node_modules

package.json

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,25 @@
2121
"queue"
2222
],
2323
"sideEffects": false,
24-
"main": "lib/index.js",
24+
"source": "src/index.js",
25+
"main": "dist/index.cjs",
26+
"module": "dist/index.module.js",
27+
"esmodule": "dist/index.modern.js",
28+
"umd:main": "dist/index.umd.js",
29+
"unpkg": "dist/index.umd.js",
30+
"exports": {
31+
".": {
32+
"browser": "./dist/index.module.js",
33+
"umd": "./dist/index.umd.js",
34+
"require": "./dist/index.cjs",
35+
"default": "./dist/index.modern.js"
36+
}
37+
},
2538
"files": [
26-
"lib"
39+
"dist"
2740
],
2841
"scripts": {
29-
"build": "rm -rf lib && babel src -d lib",
42+
"build": "NODE_ENV=production microbundle",
3043
"build-docs": "esdoc",
3144
"build-gh-pages": "npm run build-docs",
3245
"commit-msg": "commitlint --edit",
@@ -53,7 +66,6 @@
5366
"@total-order/reversed": "^1.0.0"
5467
},
5568
"devDependencies": {
56-
"@babel/cli": "7.13.10",
5769
"@babel/core": "7.13.10",
5870
"@babel/preset-env": "7.13.10",
5971
"@babel/register": "7.13.8",
@@ -72,6 +84,7 @@
7284
"esdoc-standard-plugin": "1.0.0",
7385
"fixpack": "4.0.0",
7486
"husky": "7.0.1",
87+
"microbundle": "0.13.1",
7588
"np": "7.4.0",
7689
"pinst": "2.1.6",
7790
"power-assert": "1.6.1",

0 commit comments

Comments
 (0)