Skip to content

Commit

Permalink
feat(compressor): remove butternut
Browse files Browse the repository at this point in the history
  • Loading branch information
srod committed Aug 12, 2018
1 parent b5f99cd commit a8a90c5
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 228 deletions.
94 changes: 0 additions & 94 deletions __tests__/node-minify-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,85 +322,6 @@ const tests = {
}
}
}
],
butternut: [
{
it: 'should compress javascript with {compressor} and a single file with option check',
minify: {
compressor: '{compressor}',
input: oneFile,
output: fileJSOut,
options: {
check: true
}
}
},
{
it: 'should compress javascript with {compressor} and a single file with option allowDangerousEval',
minify: {
compressor: '{compressor}',
input: oneFile,
output: fileJSOut,
options: {
allowDangerousEval: true
}
}
},
{
it: 'should compress javascript with {compressor} and a single file with option sourceMap',
minify: {
compressor: '{compressor}',
input: oneFile,
output: fileJSOut,
options: {
sourceMap: false
}
}
},
{
it: 'should compress javascript with {compressor} and a single file with option sourceMap',
minify: {
compressor: '{compressor}',
input: oneFile,
output: fileJSOut,
options: {
sourceMap: true
}
}
},
{
it: 'should compress javascript with {compressor} and a single file with option file',
minify: {
compressor: '{compressor}',
input: oneFile,
output: fileJSOut,
options: {
file: 'file.js'
}
}
},
{
it: 'should compress javascript with {compressor} and a single file with option source',
minify: {
compressor: '{compressor}',
input: oneFile,
output: fileJSOut,
options: {
source: 'source.js'
}
}
},
{
it: 'should compress javascript with {compressor} and a single file with option includeContent',
minify: {
compressor: '{compressor}',
input: oneFile,
output: fileJSOut,
options: {
includeContent: false
}
}
}
]
};

Expand Down Expand Up @@ -686,21 +607,6 @@ describe('node-minify', () => {
});
});

describe('Butternut', () => {
tests.commonjs.forEach(o => {
runOneTest(o, 'butternut');
});
tests.butternut.forEach(o => {
runOneTest(o, 'butternut');
});
tests.commonjs.forEach(o => {
runOneTest(o, 'butternut', true);
});
tests.butternut.forEach(o => {
runOneTest(o, 'butternut', true);
});
});

describe('GCC', () => {
tests.commonjs.forEach(o => {
runOneTest(o, 'gcc');
Expand Down
1 change: 0 additions & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ program.on('--help', function() {
console.log(' List of compressors:');
console.log('');
console.log(' - babel-minify');
console.log(' - butternut');
console.log(' - gcc');
console.log(' - uglifyjs');
console.log(' - uglify-es');
Expand Down
14 changes: 0 additions & 14 deletions examples/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,6 @@ compressor.minify({
});
console.log('sync 3');

compressor
.minify({
compressor: 'butternut',
input: 'public/js-es6/**/*.js',
output: 'public/js-dist/butternut-es6.js',
options: {
sourceMap: true
}
})
.then(function(min) {
console.log('then promise called');
// console.log(min);
});

compressor
.minify({
compressor: 'babel-minify',
Expand Down
2 changes: 0 additions & 2 deletions lib/compress.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import mkdirp from 'mkdirp';
import { utils } from './utils';
import {
compressBabelMinify,
compressButternut,
compressCleanCSS,
compressCrass,
compressCSSO,
Expand All @@ -40,7 +39,6 @@ if ((process.execArgv && process.execArgv.indexOf('--use_strict') > -1) || !util

const compressorsMap = {
'babel-minify': compressBabelMinify,
butternut: compressButternut,
yui: (settings, data, callback) => {
return compressYUI('css', settings, data, callback);
},
Expand Down
38 changes: 0 additions & 38 deletions lib/compressors/butternut.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/compressors/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export { compressBabelMinify } from './babel-minify';
export { compressButternut } from './butternut';
export { compressCleanCSS } from './clean-css';
export { compressCrass } from './crass';
export { compressCSSO } from './csso';
Expand Down
52 changes: 2 additions & 50 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "node-minify",
"version": "3.2.1",
"description": "Javascript / CSS minifier based on Babel-minify / Butternut / YUI Compressor / Google Closure Compiler / UglifyJS2 / Sqwish / Clean-css / CSSO",
"description": "Javascript / CSS minifier based on Babel-minify / YUI Compressor / Google Closure Compiler / UglifyJS2 / Sqwish / Clean-css / CSSO",
"homepage": "https://github.com/srod/node-minify",
"author": {
"name": "Rodolphe Stoclin",
Expand Down Expand Up @@ -32,8 +32,7 @@
"sqwish",
"clean-css",
"csso",
"babel-minify",
"butternut"
"babel-minify"
],
"scripts": {
"docs:dev": "vuepress dev docs",
Expand All @@ -60,7 +59,6 @@
"dependencies": {
"babel-core": "6.26.3",
"babel-preset-minify": "0.4.3",
"butternut": "0.4.6",
"chalk": "2.4.1",
"clean-css": "4.2.1",
"commander": "2.17.1",
Expand Down
24 changes: 0 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1058,16 +1058,6 @@ builtin-modules@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"

butternut@0.4.6:
version "0.4.6"
resolved "https://registry.yarnpkg.com/butternut/-/butternut-0.4.6.tgz#1ee4e435965e924f7d245b9e5e6a614cb19915b6"
dependencies:
acorn "^5.0.3"
chalk "^1.1.3"
magic-string "^0.20.0"
minimist "^1.2.0"
sourcemap-codec "^1.3.1"

cache-base@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
Expand Down Expand Up @@ -3401,12 +3391,6 @@ lru-cache@^4.0.1:
pseudomap "^1.0.2"
yallist "^2.1.2"

magic-string@^0.20.0:
version "0.20.0"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.20.0.tgz#255f07e0b1459dc00d74636367e9200cbb5d529d"
dependencies:
vlq "^0.2.1"

make-dir@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.2.0.tgz#6d6a49eead4aae296c53bbf3a1a008bd6c89469b"
Expand Down Expand Up @@ -4488,10 +4472,6 @@ source-map@^0.6.0, source-map@~0.6.0, source-map@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"

sourcemap-codec@^1.3.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz#c8fd92d91889e902a07aee392bdd2c5863958ba2"

spdx-correct@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82"
Expand Down Expand Up @@ -4982,10 +4962,6 @@ vinyl@^2.0.1:
remove-trailing-separator "^1.0.1"
replace-ext "^1.0.0"

vlq@^0.2.1:
version "0.2.3"
resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26"

w3c-hr-time@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045"
Expand Down

0 comments on commit a8a90c5

Please sign in to comment.