gulp-build-bitrix-modul
Version:
Сборка модуля для маркетплейса, для установки в win-1251 и utf-8
36 lines (35 loc) • 1.12 kB
JavaScript
module.exports = function (gulp, plugins, config, setting) {
return function () {
return plugins.es.map(function (file, callback) {
let options = {
excludes: [
'$MESS',
'$GLOBALS',
'$_SERVER',
'$_GET',
'$_POST',
'$_FILES',
'$_REQUEST',
'$_SESSION',
'$_ENV',
'$_COOKIE',
'$php_errormsg',
'$HTTP_RAW_POST_DATA',
'$http_response_header',
'$argc',
'$argv',
'$this'
],
minify: {
replace_variables: true,
remove_whitespace: true,
remove_comments: true,
minify_html: false
},
output: file.path
};
plugins.uglify.minify(file.path, options);
callback(null, file);
});
};
};