Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Housekeeping #1273

Merged
merged 3 commits into from
May 20, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 0 additions & 7 deletions bin/args.js
Expand Up @@ -245,13 +245,6 @@ module.exports = function (args, opts) {
return b;
};

function copy (obj) {
return Object.keys(obj).reduce(function (acc, key) {
acc[key] = obj[key];
return acc;
}, {});
}

function splitOnColon (f) {
var pos = f.lastIndexOf(':');
if (pos == -1) {
Expand Down
8 changes: 0 additions & 8 deletions bin/cmd.js
Expand Up @@ -63,14 +63,6 @@ else {
bundle.pipe(process.stdout);
}

function packageFilter (info) {
if (info && typeof info.browserify === 'string' && !info.browser) {
info.browser = info.browserify;
delete info.browserify;
}
return info || {};
}

function errorExit(err) {
if (err.stack) {
console.error(err.stack);
Expand Down
6 changes: 2 additions & 4 deletions index.js
Expand Up @@ -9,12 +9,10 @@ var builtins = require('./lib/builtins.js');
var splicer = require('labeled-stream-splicer');
var through = require('through2');
var concat = require('concat-stream');
var duplexer = require('duplexer2');

var inherits = require('inherits');
var EventEmitter = require('events').EventEmitter;
var xtend = require('xtend');
var copy = require('shallow-copy');
var isarray = require('isarray');
var defined = require('defined');
var has = require('has');
Expand Down Expand Up @@ -423,7 +421,7 @@ Browserify.prototype._createPipeline = function (opts) {

Browserify.prototype._createDeps = function (opts) {
var self = this;
var mopts = copy(opts);
var mopts = xtend(opts);
var basedir = defined(opts.basedir, process.cwd());

// Let mdeps populate these values since it will be resolving file paths
Expand Down Expand Up @@ -503,7 +501,7 @@ Browserify.prototype._createDeps = function (opts) {
else if (opts.builtins && typeof opts.builtins === 'object') {
mopts.modules = opts.builtins;
}
else mopts.modules = copy(builtins);
else mopts.modules = xtend(builtins);

Object.keys(builtins).forEach(function (key) {
if (!has(mopts.modules, key)) self._exclude.push(key);
Expand Down
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -57,7 +57,6 @@
"read-only-stream": "^1.1.1",
"readable-stream": "^1.1.13",
"resolve": "^1.1.4",
"shallow-copy": "0.0.1",
"shasum": "^1.0.0",
"shell-quote": "~0.0.1",
"stream-browserify": "^1.0.0",
Expand Down