Commit c1dcbdcf authored by Tino Goratsch's avatar Tino Goratsch

add babeljs

parent 433ec13b
{
"presets": [
"@babel/preset-env",
["minify", {
"builtIns": false
}]
]
}
/*
* Copyright (c) by the ACP3 Developers.
* See the LICENSE file at the top-level module directory for licensing details.
*/
module.exports = (gulp, plugins) => {
'use strict';
const babel = require("gulp-babel");
return () => {
return gulp
.src(
[
'./ACP3/Modules/*/*/Resources/Assets/js/**/*.js',
'./designs/**/Assets/js/**/*.js',
'./installation/design/Assets/js/*.js',
'./installation/Installer/Modules/*/Resources/Assets/js/*.js',
// Exclude all already minified files
'!./ACP3/Modules/*/*/Resources/Assets/js/**/*.min.js',
'!./ACP3/Modules/ACP3/Wysiwygckeditor/Resources/Assets/js/ckeditor/**/*.js',
'!./designs/**/Assets/js/**/*.min.js',
'!./installation/design/Assets/js/*.min.js',
'!./installation/Installer/Modules/*/Resources/Assets/js/*.min.js'
],
{base: './'}
)
.pipe(plugins.plumber())
.pipe(babel())
.pipe(plugins.rename((path) => {
path.basename += '.min';
}))
.pipe(gulp.dest('./'));
};
};
......@@ -15,7 +15,8 @@
gulp.task('copy', getTask('copy'));
gulp.task('bump-version', getTask('bump-version'));
gulp.task('scss', gulp.series(getTask('scss')));
gulp.task('scss', getTask('scss'));
gulp.task('babel-js', getTask('babel-js'));
gulp.task('watch', gulp.series('scss', getTask('watch')));
gulp.task('default', gulp.series('watch'));
......
This diff is collapsed.
......@@ -20,9 +20,13 @@
"homepage": "https://www.acp3-cms.net",
"private": true,
"devDependencies": {
"@babel/core": "^7.4.3",
"@babel/preset-env": "^7.4.3",
"autoprefixer": "^9.5.1",
"babel-preset-minify": "^0.5.0",
"eslint": "^5.16.0",
"gulp": "^4.0.1",
"gulp-babel": "^8.0.0-beta.2",
"gulp-bump": "^3.1.3",
"gulp-change": "^1.0.2",
"gulp-load-plugins": "^1.5.0",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment