Skip to content

Commit 30ba8f0

Browse files
🔨 config(build): Use microbundle instead of @babel/cli.
1 parent 83a9e21 commit 30ba8f0

File tree

4 files changed

+1644
-208
lines changed

4 files changed

+1644
-208
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
@@ -19,12 +19,25 @@
1919
"structures"
2020
],
2121
"sideEffects": false,
22-
"main": "lib/index.js",
22+
"source": "src/index.js",
23+
"main": "dist/index.cjs",
24+
"module": "dist/index.module.js",
25+
"esmodule": "dist/index.modern.js",
26+
"umd:main": "dist/index.umd.js",
27+
"unpkg": "dist/index.umd.js",
28+
"exports": {
29+
".": {
30+
"browser": "./dist/index.module.js",
31+
"umd": "./dist/index.umd.js",
32+
"require": "./dist/index.cjs",
33+
"default": "./dist/index.modern.js"
34+
}
35+
},
2336
"files": [
24-
"lib"
37+
"dist"
2538
],
2639
"scripts": {
27-
"build": "babel --delete-dir-on-start --env-name production src -d lib",
40+
"build": "NODE_ENV=production microbundle",
2841
"build-docs": "esdoc",
2942
"build-gh-pages": "npm run build-docs",
3043
"commit-msg": "commitlint --edit",
@@ -47,7 +60,6 @@
4760
"@iterable-iterator/reduce": "^1.0.1"
4861
},
4962
"devDependencies": {
50-
"@babel/cli": "7.13.10",
5163
"@babel/core": "7.13.10",
5264
"@babel/preset-env": "7.13.10",
5365
"@babel/register": "7.13.8",
@@ -71,6 +83,7 @@
7183
"esdoc-standard-plugin": "1.0.0",
7284
"fixpack": "4.0.0",
7385
"husky": "7.0.1",
86+
"microbundle": "0.13.1",
7487
"np": "7.4.0",
7588
"pinst": "2.1.6",
7689
"power-assert": "1.6.1",

0 commit comments

Comments
 (0)