Backporting to 0.10

* Backporting to 0.10 for Meteor.

* Still use zlib if possible.

* Updated README.

* Try Travis CI for 0.10.
This commit is contained in:
Mitar 2016-04-21 14:45:11 -07:00 committed by Luke Page
parent 3c121291e8
commit e1c1022162
5 changed files with 13 additions and 2 deletions

View file

@ -2,5 +2,6 @@ language: node_js
after_success:
- test $TRAVIS_NODE_VERSION = '4.3' && npm run coverage && npm install coveralls@2 && npm run coveralls
node_js:
- "0.10"
- "0.12"
- "4.1"

View file

@ -23,7 +23,7 @@ Requirements
============
* Async - Node.js 0.10 / 0.12 / IO.js
* Sync - Node.js 0.12 / IO.js
* Sync - Node.js 0.12 / IO.js (0.10 with [node-zlib-backport](https://www.npmjs.com/package/node-zlib-backport) dependency)
Comparison Table
================

View file

@ -1,6 +1,10 @@
'use strict';
var zlib = require('zlib');
if (!zlib.deflateSync) {
// Backwards compatibility with 0.10.
zlib = require('node-zlib-backport');
}
var constants = require('./constants');
var Packer = require('./packer');

View file

@ -1,7 +1,10 @@
'use strict';
var zlib = require('zlib');
if (!zlib.inflateSync) {
// Backwards compatibility with 0.10.
zlib = require('node-zlib-backport');
}
var SyncReader = require('./sync-reader');
var FilterSync = require('./filter-parse-sync');
var Parser = require('./parser');

View file

@ -49,6 +49,9 @@
"bugs": {
"url": "https://github.com/lukeapage/pngjs2/issues"
},
"optionalDependencies": {
"node-zlib-backport": "^0.11.15"
},
"devDependencies": {
"buffer-equal": "1.0.0",
"connect": "^3.4.0",