Skip to content

Commit 02c142b

Browse files
committed
use original node zlib.js; add build system
Now src/index.js is the same as node core zlib.js, with only two requires changed. Because that uses ES6 syntax, babel is needed.
1 parent 4cbd891 commit 02c142b

File tree

4 files changed

+419
-397
lines changed

4 files changed

+419
-397
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ node_modules
44
*.log
55

66
test/tmp
7+
lib

.npmignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
.DS_Store
3+
4+
*.log
5+
6+
test/tmp

package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@
66
"zlib",
77
"browserify"
88
],
9-
"main": "src/index.js",
9+
"main": "lib/index.js",
1010
"directories": {
1111
"test": "test"
1212
},
1313
"dependencies": {
1414
"pako": "~1.0.1"
1515
},
1616
"devDependencies": {
17+
"babel-cli": "^6.11.4",
18+
"babel-preset-es2015": "^6.13.2",
1719
"brfs": "^1.0.1",
1820
"karma": "^1.1.0",
1921
"karma-browserify": "^5.0.3",
@@ -28,11 +30,18 @@
2830
"watchify": "^3.7.0"
2931
},
3032
"scripts": {
31-
"lint": "standard",
33+
"build": "babel src --out-dir lib",
34+
"lint": "standard \"src/binding.js\" \"test/**/*.js\"",
35+
"pretest": "npm run build",
3236
"test": "npm run test:node && npm run test:browser",
3337
"test:browser": "karma start --single-run=true karma.conf.js",
3438
"test:node": "mocha test/test-*"
3539
},
40+
"babel": {
41+
"presets": [
42+
"es2015"
43+
]
44+
},
3645
"author": "Devon Govett <[email protected]>",
3746
"license": "MIT",
3847
"repository": {

0 commit comments

Comments
 (0)