1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-03 12:20:04 +02:00

add some babel stuff

This commit is contained in:
s2
2018-05-05 15:35:25 +02:00
parent d17c4fe70c
commit e76e795120
604 changed files with 103725 additions and 62 deletions

30
node_modules/babel-minify/lib/index.js generated vendored Normal file
View File

@@ -0,0 +1,30 @@
"use strict";
const babelCore = require("@babel/core");
const babelPresetMinify = require("babel-preset-minify");
module.exports = function babelMinify(input, // Minify options passed to minifyPreset
// defaults are handled in preset
options = {}, // overrides and other options
{
minified = true,
inputSourceMap,
sourceMaps = false,
sourceType = "script",
// to override the default babelCore used
babel = babelCore,
// to override the default minify preset used
minifyPreset = babelPresetMinify
} = {}) {
return babel.transformSync(input, {
babelrc: false,
configFile: false,
presets: [[minifyPreset, options]],
comments: false,
inputSourceMap,
sourceMaps,
minified,
sourceType
});
};