Skip to content

Commit

Permalink
Clean up ununsed devDeps
Browse files Browse the repository at this point in the history
Also removed object-assign. We only support building with node v4+ which has Object.assign.
  • Loading branch information
zpao committed Jan 22, 2016
1 parent 1aa7fd0 commit 7c52b80
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 15 deletions.
3 changes: 1 addition & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

var assign = require('object-assign');
var path = require('path');
var process = require('process');

Expand Down Expand Up @@ -35,7 +34,7 @@ module.exports = function(grunt) {
// but if it breaks we'll fix it then.
cmd: path.join('node_modules', '.bin', GULP_EXE),
args: args,
opts: assign({stdio: 'inherit'}, opts),
opts: Object.assign({stdio: 'inherit'}, opts),
}, function(err, result, code) {
if (err) {
grunt.fail.fatal('Something went wrong running gulp: ', result);
Expand Down
5 changes: 2 additions & 3 deletions grunt/tasks/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

'use strict';

var assign = require('object-assign');
var async = require('async');
var fs = require('fs');
var glob = require('glob');
Expand Down Expand Up @@ -34,7 +33,7 @@ function getCollectCoverageOnlyFrom(callback) {
var result = {};

async.each(patterns, function(pattern) {
var options = assign({ nodir: true }, collectCoverageOnlyFrom[pattern]);
var options = Object.assign({ nodir: true }, collectCoverageOnlyFrom[pattern]);
glob(pattern, options, function(err, files) {
(files || []).reduce(function(object, key) {
object[key] = true;
Expand All @@ -51,7 +50,7 @@ function getCollectCoverageOnlyFrom(callback) {
function getJestConfig(callback) {
var rootDir = path.resolve(buildPath, path.resolve(config.rootDir));
getCollectCoverageOnlyFrom(function(err, data) {
callback(err, assign({}, config, {
callback(err, Object.assign({}, config, {
rootDir: rootDir,
collectCoverage: true,
collectCoverageOnlyFrom: data,
Expand Down
3 changes: 1 addition & 2 deletions grunt/tasks/npm-react-addons.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

var assign = require('object-assign');
var fs = require('fs');
var grunt = require('grunt');
var path = require('path');
Expand Down Expand Up @@ -76,7 +75,7 @@ function buildReleases() {
var destLicense = path.join(destDir, 'LICENSE');
var destPatents = path.join(destDir, 'PATENTS');

var pkgData = assign({}, pkgTemplate);
var pkgData = Object.assign({}, pkgTemplate);
pkgData.name = pkgName;

grunt.file.mkdir(destDir);
Expand Down
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"async": "^1.5.0",
"babel": "^5.8.29",
"babel-eslint": "4.1.5",
"benchmark": "^1.0.0",
"browserify": "^12.0.1",
"bundle-collapser": "^1.1.1",
"coffee-script": "^1.8.0",
Expand All @@ -28,12 +27,8 @@
"gulp": "^3.9.0",
"gulp-babel": "^5.3.0",
"gulp-flatten": "^0.2.0",
"gulp-util": "^3.0.7",
"gzip-js": "~0.3.2",
"jest-cli": "^0.6.1",
"jstransform": "^11.0.0",
"object-assign": "^4.0.1",
"optimist": "^0.6.1",
"platform": "^1.1.0",
"run-sequence": "^1.1.4",
"through2": "^2.0.0",
Expand Down
7 changes: 4 additions & 3 deletions scripts/jest/preprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ process.env.NODE_ENV = 'test';

var path = require('path');

var assign = require('object-assign');
var babel = require('babel');
var coffee = require('coffee-script');

Expand Down Expand Up @@ -52,8 +51,10 @@ module.exports = {
!filePath.match(/\/node_modules\//) &&
!filePath.match(/\/third_party\//)
) {
var rv =
babel.transform(src, assign({filename: filePath}, babelOptions)).code;
var rv = babel.transform(
src,
Object.assign({filename: filePath}, babelOptions)
).code;
// hax to turn fbjs/lib/foo into /path/to/node_modules/fbjs/lib/foo
// because jest is slooow with node_modules paths (facebook/jest#465)
rv = rv.replace(
Expand Down

0 comments on commit 7c52b80

Please sign in to comment.