Skip to content

Commit

Permalink
drop node 0.10/0.12, add peerDep on babel-core instead of dep, drop o…
Browse files Browse the repository at this point in the history
…bject-assign, add package-lock
  • Loading branch information
hzoo authored and zertosh committed Oct 24, 2017
1 parent 6d45fa8 commit 02f97ec
Show file tree
Hide file tree
Showing 4 changed files with 5,294 additions and 12 deletions.
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
sudo: false
language: node_js
node_js:
- "0.10"
- "0.12"
- "4"
- "5"
- "8"
- "6"
- "4"

before_install:
- npm install -g npm@^3.3.0
- npm install -g npm@5
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
var assign = require("object-assign");
var stream = require("stream");
var babel = require("babel-core");
var util = require("util");
Expand All @@ -14,7 +13,7 @@ function Babelify(filename, opts) {
stream.Transform.call(this);
this._data = "";
this._filename = filename;
this._opts = assign({filename: filename}, opts);
this._opts = Object.assign({filename: filename}, opts);
}

Babelify.prototype._transform = function (buf, enc, callback) {
Expand All @@ -36,7 +35,7 @@ Babelify.prototype._flush = function (callback) {
};

Babelify.configure = function (opts) {
opts = assign({}, opts);
opts = Object.assign({}, opts);
var extensions = opts.extensions ? babel.util.arrayify(opts.extensions) : null;
var sourceMapsAbsolute = opts.sourceMapsAbsolute;
if (opts.sourceMaps !== false) opts.sourceMaps = "inline";
Expand Down Expand Up @@ -68,7 +67,7 @@ Babelify.configure = function (opts) {
}

var _opts = sourceMapsAbsolute
? assign({sourceFileName: filename}, opts)
? Object.assign({sourceFileName: filename}, opts)
: opts;

return new Babelify(filename, _opts);
Expand Down

0 comments on commit 02f97ec

Please sign in to comment.