Skip to content

Commit 2ad9a40

Browse files
committed
feat(npm): smaller npm download size
1 parent 615fa60 commit 2ad9a40

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

package.json

+10-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@
1414
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
1515
"error": "echo \"an error on purpose\" && exit -1",
1616
"lint": "standard bin/*.js src/*.js",
17-
"example": "node bin/npm-quick-run.js li"
17+
"example": "node bin/npm-quick-run.js li",
18+
"size": "t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";"
1819
},
20+
"files": [
21+
"bin",
22+
"src/*.js",
23+
"!src/*-spec.js"
24+
],
1925
"preferGlobal": true,
2026
"repository": {
2127
"type": "git",
@@ -50,7 +56,9 @@
5056
"npm test",
5157
"npm run example"
5258
],
53-
"pre-push": [],
59+
"pre-push": [
60+
"npm run size"
61+
],
5462
"post-commit": [],
5563
"post-merge": []
5664
}

0 commit comments

Comments
 (0)