Merge pull request #6413 from zpao/deps-cleanup

Upgrade a few package dependencies, remove unused task
This commit is contained in:
Paul O’Shannessy committed 2016-04-06 14:23:54 -07:00
commit 3f9e21f4eb
6 files changed
+4 -129

No files matched your search

-4
View File
@@ -11,7 +11,6 @@ module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jsx: require('./grunt/config/jsx'),
browserify: require('./grunt/config/browserify'),
npm: require('./grunt/config/npm'),
clean: [
@@ -62,9 +61,6 @@ module.exports = function(grunt) {
spawnGulp(['react:clean'], null, this.async());
});
// Register jsx:normal and :release tasks.
grunt.registerMultiTask('jsx', require('./grunt/tasks/jsx'));
// Our own browserify-based tasks to build a single JS file build.
grunt.registerMultiTask('browserify', require('./grunt/tasks/browserify'));
-48
View File
@@ -1,48 +0,0 @@
#!/usr/bin/env node
// -*- mode: js -*-
// vim: set ft=javascript :
'use strict';
var babel = require('babel');
var devExpressionPlugin = require('fbjs/scripts/babel/dev-expression');
var TRANSFORM_IGNORE_RE = /^WebComponents$/;
require('commoner').version(
require('../package.json').version
).resolve(function(id) {
var context = this;
// Note that the result of context.getProvidedP() is cached for the
// duration of the build, so it is both consistent and cheap to
// evaluate multiple times.
return context.getProvidedP().then(function(idToPath) {
// If a module declares its own identifier using @providesModule
// then that identifier will be a key in the idToPath object.
if (idToPath.hasOwnProperty(id)) {
return context.readFileP(idToPath[id]);
}
// Otherwise assume the identifier maps directly to a path in the
// filesystem.
return context.readModuleP(id);
});
}).process(function(id, source) {
var context = this;
// This is hacky but that's ok… It really only matters for tests since it
// won't otherwise be in the dependency tree.
if (!TRANSFORM_IGNORE_RE.test(id)) {
// This is where JSX, ES6, etc. desugaring happens.
source = babel.transform(source, {
blacklist: ['spec.functionName', 'validation.react'],
plugins: [devExpressionPlugin],
filename: id,
}).code;
}
return source;
});
-25
View File
@@ -1,25 +0,0 @@
'use strict';
var grunt = require('grunt');
var rootIDs = [
'React',
'ReactWithAddons',
// deprecated is used in the npm package but not anywhere else, so build it.
'deprecated',
];
var normal = {
rootIDs: rootIDs,
getConfig: function() {
return {
commonerConfig: grunt.config.data.pkg.commonerConfig,
};
},
sourceDir: 'src',
outputDir: 'build/modules',
};
module.exports = {
normal: normal,
};
-48
View File
@@ -1,48 +0,0 @@
'use strict';
var path = require('path');
var grunt = require('grunt');
var expand = grunt.file.expand;
var spawn = grunt.util.spawn;
module.exports = function() {
var done = this.async();
var config = this.data;
var args = [
'--cache-dir', '.module-cache',
'--relativize',
'--follow-requires',
'--use-provides-module',
config.sourceDir,
config.outputDir,
];
var rootIDs = expand({
nonull: true, // Keep IDs that don't expand to anything.
cwd: 'src',
}, config.rootIDs).map(function(id) {
return id.replace(/\.js$/i, '');
});
args.push.apply(args, rootIDs);
args.push('--config');
var child = spawn({
cmd: 'node',
args: [path.join('bin', 'jsx-internal')].concat(args),
}, function(error, result, code) {
if (error) {
grunt.log.error(error);
done(false);
} else {
done();
}
});
child.stdin.write(JSON.stringify(config.getConfig()));
child.stdin.end();
child.stdout.pipe(process.stdout);
child.stderr.pipe(process.stderr);
};
+3 -3
View File
@@ -26,7 +26,7 @@
"babel-plugin-transform-es3-member-expression-literals": "^6.5.0",
"babel-plugin-transform-es3-property-literals": "^6.5.0",
"babel-preset-react": "^6.5.0",
"browserify": "^12.0.1",
"browserify": "^13.0.0",
"bundle-collapser": "^1.1.1",
"coffee-script": "^1.8.0",
"coveralls": "^2.11.6",
@@ -35,8 +35,8 @@
"eslint": "1.10.3",
"eslint-plugin-react": "4.1.0",
"eslint-plugin-react-internal": "file:eslint-rules",
"fbjs": "^0.8.0-alpha.2",
"fbjs-scripts": "^0.6.0-alpha.3",
"fbjs": "^0.8.0",
"fbjs-scripts": "^0.6.0",
"glob": "^6.0.1",
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
+1 -1
View File
@@ -23,7 +23,7 @@
"node": ">=0.10.0"
},
"dependencies": {
"fbjs": "^0.8.0-alpha.2",
"fbjs": "^0.8.0",
"loose-envify": "^1.1.0",
"object-assign": "^4.0.1"
},