@node-minify/babel-minify
Advanced tools
Comparing version 7.0.0 to 7.1.0
"use strict"; | ||
var _babelCore = require("babel-core"); | ||
var _babelPresetMinify = _interopRequireDefault(require("babel-preset-minify")); | ||
var _utils = require("@node-minify/utils"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
/*! | ||
@@ -37,7 +33,5 @@ * node-minify | ||
}; | ||
if (settings.options.babelrc) { | ||
babelOptions = JSON.parse(_utils.utils.readFile(settings.options.babelrc)); | ||
} | ||
if (settings.options.presets) { | ||
@@ -47,9 +41,6 @@ const babelrcPresets = babelOptions.presets || []; | ||
} | ||
if (babelOptions.presets.indexOf('minify') === -1) { | ||
babelOptions.presets = babelOptions.presets.concat([_babelPresetMinify.default]); | ||
} | ||
const contentMinified = (0, _babelCore.transform)(content, babelOptions); | ||
if (!settings.content) { | ||
@@ -62,14 +53,11 @@ _utils.utils.writeFile({ | ||
} | ||
if (callback) { | ||
return callback(null, contentMinified.code); | ||
} | ||
return contentMinified.code; | ||
}; | ||
/** | ||
* Expose `minifyBabel()`. | ||
*/ | ||
module.exports = minifyBabel; |
{ | ||
"name": "@node-minify/babel-minify", | ||
"version": "7.0.0", | ||
"version": "7.1.0", | ||
"description": "babel-minify plugin for @node-minify", | ||
@@ -36,7 +36,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@node-minify/utils": "^7.0.0", | ||
"@node-minify/utils": "^7.1.0", | ||
"babel-core": "6.26.3", | ||
"babel-preset-minify": "0.5.2" | ||
}, | ||
"gitHead": "8b5bda6f1ac9fe7180006f2a19ec3253e8fff4ec" | ||
"gitHead": "94cef2d5d653c3bddc3e603b4e25c135b0b6f4b3" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4952
Updated@node-minify/utils@^7.1.0