Skip to content

Commit

Permalink
Fixing minification
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Zabriskie committed Aug 28, 2014
1 parent 960a583 commit 6bd8c3a
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 2,453 deletions.
15 changes: 11 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,24 +63,31 @@ module.exports = function(grunt) {
output: {
path: 'dist/',
filename: 'axios.js',
sourceMapFilename: 'axios.map',
library: 'axios'
},
devtool: '#inline-source-map'
devtool: 'source-map'
};

['amd', 'global'].forEach(function (key) {
webpackConfig[key] = JSON.parse(JSON.stringify(webpackBase));
webpackConfig[key + '-min'] = JSON.parse(JSON.stringify(webpackBase));
webpackConfig[key + '-min'].pugins = [
new webpack.optimize.UglifyJsPlugin()
];

// TODO: UglifyJsPlugin doesn' work, but optimize.minimize is deprecated
webpackConfig[key + '-min'].optimize = {minimize: true};
// webpackConfig[key + '-min'].pugins = [
// new webpack.optimize.UglifyJsPlugin()
// ];
});

webpackConfig['amd'].output.filename = 'axios.amd.js';
webpackConfig['amd'].output.sourceMapFilename = 'axios.amd.map';
webpackConfig['amd'].output.libraryTarget = 'amd';
webpackConfig['amd-min'].output.filename = 'axios.amd.min.js';
webpackConfig['amd-min'].output.sourceMapFilename = 'axios.amd.min.map';
webpackConfig['amd-min'].output.libraryTarget = 'amd';
webpackConfig['global-min'].output.filename = 'axios.min.js';
webpackConfig['global-min'].output.sourceMapFilename = 'axios.min.map';

return webpackConfig;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/axios.amd.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/axios.amd.map

Large diffs are not rendered by default.

Loading

0 comments on commit 6bd8c3a

Please sign in to comment.