mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-24 08:53:05 +03:00
Added Babel transpilation support to the gulp workflow
This commit is contained in:
parent
e979f08215
commit
70625e37a5
4 changed files with 1474 additions and 8 deletions
3
babel.config.json
Normal file
3
babel.config.json
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"presets": ["@babel/preset-env"]
|
||||||
|
}
|
20
gulpfile.js
20
gulpfile.js
|
@ -9,15 +9,16 @@
|
||||||
* @since v1.4.0
|
* @since v1.4.0
|
||||||
* ---------------------------------------------------------------------------- */
|
* ---------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
const babel = require('gulp-babel');
|
||||||
const changed = require('gulp-changed');
|
const changed = require('gulp-changed');
|
||||||
const childProcess = require('child_process');
|
const childProcess = require('child_process');
|
||||||
const sass = require('gulp-sass')(require('sass'));
|
|
||||||
const css = require('gulp-clean-css');
|
const css = require('gulp-clean-css');
|
||||||
const del = require('del');
|
const del = require('del');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const gulp = require('gulp');
|
const gulp = require('gulp');
|
||||||
const plumber = require('gulp-plumber');
|
const plumber = require('gulp-plumber');
|
||||||
const rename = require('gulp-rename');
|
const rename = require('gulp-rename');
|
||||||
|
const sass = require('gulp-sass')(require('sass'));
|
||||||
const uglify = require('gulp-uglify');
|
const uglify = require('gulp-uglify');
|
||||||
const zip = require('zip-dir');
|
const zip = require('zip-dir');
|
||||||
|
|
||||||
|
@ -82,13 +83,16 @@ function clean(done) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function scripts() {
|
function scripts() {
|
||||||
return gulp
|
return (
|
||||||
.src(['assets/js/**/*.js', '!assets/js/**/*.min.js'])
|
gulp
|
||||||
.pipe(plumber())
|
.src(['assets/js/**/*.js', '!assets/js/**/*.min.js'])
|
||||||
.pipe(changed('assets/js/**/*'))
|
.pipe(plumber())
|
||||||
.pipe(uglify().on('error', console.log))
|
.pipe(changed('assets/js/**/*'))
|
||||||
.pipe(rename({suffix: '.min'}))
|
.pipe(babel())
|
||||||
.pipe(gulp.dest('assets/js'));
|
// .pipe(uglify().on('error', console.log))
|
||||||
|
.pipe(rename({suffix: '.min'}))
|
||||||
|
.pipe(gulp.dest('assets/js'))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function styles() {
|
function styles() {
|
||||||
|
|
1456
package-lock.json
generated
1456
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -37,9 +37,12 @@
|
||||||
"trumbowyg": "^2.21.0"
|
"trumbowyg": "^2.21.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.16.0",
|
||||||
|
"@babel/preset-env": "^7.16.0",
|
||||||
"del": "^6.0.0",
|
"del": "^6.0.0",
|
||||||
"fs-extra": "^10.0.0",
|
"fs-extra": "^10.0.0",
|
||||||
"gulp": "^4.0.2",
|
"gulp": "^4.0.2",
|
||||||
|
"gulp-babel": "^8.0.0",
|
||||||
"gulp-changed": "^3.2.0",
|
"gulp-changed": "^3.2.0",
|
||||||
"gulp-clean-css": "^3.10.0",
|
"gulp-clean-css": "^3.10.0",
|
||||||
"gulp-debug": "^4.0.0",
|
"gulp-debug": "^4.0.0",
|
||||||
|
|
Loading…
Reference in a new issue