Skip to content

Commit

Permalink
Renamed browserify tasks/configs to cjs, updated pure-cjs to 1.9.…
Browse files Browse the repository at this point in the history
…0 for better build speed.
  • Loading branch information
RReverser committed Mar 11, 2014
1 parent 3171436 commit 9e224e6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 22 deletions.
36 changes: 18 additions & 18 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var exec = require('child_process').exec;
var jsxTask = require('./grunt/tasks/jsx');
var browserifyTask = require('./grunt/tasks/browserify');
var commonjsTask = require('./grunt/tasks/commonjs');
var populistTask = require('./grunt/tasks/populist');
var webdriverPhantomJSTask = require('./grunt/tasks/webdriver-phantomjs');
var webdriverJasmineTasks = require('./grunt/tasks/webdriver-jasmine');
Expand All @@ -19,7 +19,7 @@ module.exports = function(grunt) {
pkg: grunt.file.readJSON('package.json'),
copy: require('./grunt/config/copy'),
jsx: require('./grunt/config/jsx'),
browserify: require('./grunt/config/browserify'),
commonjs: require('./grunt/config/commonjs'),
populist: require('./grunt/config/populist'),
connect: require('./grunt/config/server')(grunt),
"webdriver-jasmine": require('./grunt/config/webdriver-jasmine'),
Expand Down Expand Up @@ -52,8 +52,8 @@ module.exports = function(grunt) {
// Register jsx:normal and :release tasks.
grunt.registerMultiTask('jsx', jsxTask);

// Our own browserify-based tasks to build a single JS file build
grunt.registerMultiTask('browserify', browserifyTask);
// Our own commonjs-based tasks to build a single JS file build
grunt.registerMultiTask('commonjs', commonjsTask);

grunt.registerMultiTask('populist', populistTask);

Expand All @@ -71,22 +71,22 @@ module.exports = function(grunt) {

grunt.registerTask('version-check', versionCheckTask);

grunt.registerTask('build:basic', ['jsx:normal', 'version-check', 'browserify:basic']);
grunt.registerTask('build:addons', ['jsx:normal', 'browserify:addons']);
grunt.registerTask('build:transformer', ['jsx:normal', 'browserify:transformer']);
grunt.registerTask('build:min', ['jsx:normal', 'version-check', 'browserify:min']);
grunt.registerTask('build:addons-min', ['jsx:normal', 'browserify:addonsMin']);
grunt.registerTask('build:basic', ['jsx:normal', 'version-check', 'commonjs:basic']);
grunt.registerTask('build:addons', ['jsx:normal', 'commonjs:addons']);
grunt.registerTask('build:transformer', ['jsx:normal', 'commonjs:transformer']);
grunt.registerTask('build:min', ['jsx:normal', 'version-check', 'commonjs:min']);
grunt.registerTask('build:addons-min', ['jsx:normal', 'commonjs:addonsMin']);
grunt.registerTask('build:withCodeCoverageLogging', [
'jsx:normal',
'version-check',
'browserify:withCodeCoverageLogging'
'commonjs:withCodeCoverageLogging'
]);
grunt.registerTask('build:perf', [
'jsx:normal',
'version-check',
'browserify:transformer',
'browserify:basic',
'browserify:min',
'commonjs:transformer',
'commonjs:basic',
'commonjs:min',
'download-previous-version'
]);
grunt.registerTask('build:test', [
Expand Down Expand Up @@ -195,11 +195,11 @@ module.exports = function(grunt) {
'delete-build-modules',
'jsx:normal',
'version-check',
'browserify:basic',
'browserify:transformer',
'browserify:addons',
'browserify:min',
'browserify:addonsMin',
'commonjs:basic',
'commonjs:transformer',
'commonjs:addons',
'commonjs:min',
'commonjs:addonsMin',
'npm-react:release',
'npm-react:pack',
'npm-react-tools:pack',
Expand Down
5 changes: 2 additions & 3 deletions grunt/config/browserify.js → grunt/config/commonjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ var envify = require('envify/custom');
var es3ify = require('es3ify');
var grunt = require('grunt');
var UglifyJS = require('uglify-js');
var uglifyify = require('uglifyify');
var _ = require('lodash');

var SIMPLE_TEMPLATE =
Expand Down Expand Up @@ -71,7 +70,7 @@ var basic = {
var min = _.merge({}, basic, {
outfile: './build/react.min.js',
debug: false,
transforms: [envify({NODE_ENV: 'production'}), uglifyify],
transforms: [envify({NODE_ENV: 'production'})],
after: [minify, bannerify]
});

Expand Down Expand Up @@ -101,7 +100,7 @@ var addons = {
var addonsMin = _.merge({}, addons, {
outfile: './build/react-with-addons.min.js',
debug: false,
transforms: [envify({NODE_ENV: 'production'}), uglifyify],
transforms: [envify({NODE_ENV: 'production'})],
after: [minify, bannerify]
});

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"phantomjs": "~1.9",
"platform": "~1.0.0",
"populist": "~0.1.6",
"pure-cjs": "~1.8.3",
"pure-cjs": "~1.9.0",
"recast": "~0.5.6",
"sauce-tunnel": "~1.1.0",
"semver": "~2.2.1",
Expand Down

0 comments on commit 9e224e6

Please sign in to comment.