Skip to content

Commit 686ef98

Browse files
committed
feat: bundle node_modules for smaller size
1 parent 3f075b8 commit 686ef98

File tree

5 files changed

+1997
-31
lines changed

5 files changed

+1997
-31
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
dist
3+
/lib
34
/types

bili.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
input: 'lib/index.js',
3+
js: false,
4+
inline: true,
5+
filename: 'index.js'
6+
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
],
1616
"scripts": {
1717
"test": "jest",
18-
"build": "tsc",
18+
"build": "tsc && bili",
1919
"toc": "markdown-toc -i README.md",
2020
"prepublishOnly": "npm run build"
2121
},
@@ -25,22 +25,22 @@
2525
"@types/execa": "^0.9.0",
2626
"@types/jest": "^23.3.9",
2727
"@types/mri": "^1.1.0",
28+
"bili": "^3.4.2",
2829
"cz-conventional-changelog": "^2.1.0",
2930
"eslint-config-rem": "^3.0.0",
3031
"execa": "^1.0.0",
3132
"husky": "^1.2.0",
3233
"jest": "^23.6.0",
3334
"lint-staged": "^8.1.0",
3435
"markdown-toc": "^1.2.0",
36+
"mri": "^1.1.1",
3537
"prettier": "^1.15.2",
3638
"semantic-release": "^15.12.1",
3739
"ts-jest": "^23.10.5",
3840
"ts-node": "^7.0.1",
3941
"typescript": "^3.1.6"
4042
},
41-
"dependencies": {
42-
"mri": "^1.1.1"
43-
},
43+
"dependencies": {},
4444
"release": {
4545
"branch": "master"
4646
},

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"strictFunctionTypes": true,
2020
"alwaysStrict": true,
2121
"module": "commonjs",
22-
"outDir": "dist"
22+
"outDir": "lib"
2323
},
2424
"include": ["src", "declarations.d.ts"]
2525
}

0 commit comments

Comments
 (0)