Skip to content

Commit

Permalink
Merge pull request #736 from spicyj/minify-before-browserify
Browse files Browse the repository at this point in the history
Minify both before and after browserify
  • Loading branch information
petehunt committed Dec 29, 2013
2 parents 7e29f46 + 76c9d84 commit eab2ede
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
5 changes: 3 additions & 2 deletions grunt/config/browserify.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
var envify = require('envify/custom');
var grunt = require('grunt');
var UglifyJS = require('uglify-js');
var uglifyify = require('uglifyify');

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

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

Expand Down
29 changes: 15 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,30 @@
},
"devDependencies": {
"browserify": "~2.36.1",
"coverify": "~0.1.1",
"envify": "~1.0.1",
"populist": "~0.1.6",
"grunt-cli": "~0.1.9",
"es5-shim": "~2.1.0",
"grunt": "~0.4.1",
"grunt-cli": "~0.1.9",
"grunt-compare-size": "~0.4.0",
"grunt-complexity": "~0.1.3",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-compress": "~0.5.1",
"grunt-contrib-connect": "~0.5.0",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-jshint": "~0.7.2",
"gzip-js": "~0.3.2",
"jasmine-tapreporter": "~0.2.2",
"optimist": "~0.6.0",
"phantomjs": "~1.9",
"populist": "~0.1.6",
"recast": "~0.5.6",
"sauce-tunnel": "~1.1.0",
"semver": "~2.2.1",
"uglify-js": "~2.4.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-compare-size": "~0.4.0",
"gzip-js": "~0.3.2",
"tmp": "~0.0.18",
"grunt-contrib-compress": "~0.5.1",
"jasmine-tapreporter": "~0.2.2",
"grunt-contrib-connect": "~0.5.0",
"es5-shim": "~2.1.0",
"wd": "~0.2.6",
"sauce-tunnel": "~1.1.0",
"coverify": "~0.1.1",
"grunt-complexity": "~0.1.3"
"uglify-js": "~2.4.0",
"uglifyify": "~1.0.1",
"wd": "~0.2.6"
},
"engines": {
"node": ">=0.10.0"
Expand Down

0 comments on commit eab2ede

Please sign in to comment.