Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't pass default options and remove redundant helpers. Fixes #473 #476

Merged
merged 1 commit into from
Mar 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions config/helpers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var path = require('path');
var zlib = require('zlib');


// Helper functions
Expand All @@ -11,10 +10,6 @@ function hasProcessFlag(flag) {
return process.argv.join('').indexOf(flag) > -1;
}

function gzipMaxLevel(buffer, callback) {
return zlib['gzip'](buffer, {level: 9}, callback);
}

function root(args) {
args = Array.prototype.slice.call(arguments, 0);
return path.join.apply(path, [_root].concat(args));
Expand Down Expand Up @@ -66,7 +61,6 @@ function reverse(arr) {

exports.reverse = reverse;
exports.hasProcessFlag = hasProcessFlag;
exports.gzipMaxLevel = gzipMaxLevel;
exports.root = root;
exports.rootNode = rootNode;
exports.prependExt = prependExt;
Expand Down
1 change: 0 additions & 1 deletion config/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ module.exports = webpackMerge(commonConfig, {
//
// See: https://github.com/webpack/compression-webpack-plugin
new CompressionPlugin({
algorithm: helpers.gzipMaxLevel,
regExp: /\.css$|\.html$|\.js$|\.map$/,
threshold: 2 * 1024
})
Expand Down