mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 15:07:02 +03:00
Code refactoring
Flow first look
This commit is contained in:
parent
2f841524cb
commit
e6e0b02849
71 changed files with 2092 additions and 1836 deletions
17
gulpfile.js
17
gulpfile.js
|
|
@ -391,20 +391,33 @@ gulp.task('js:admin', ['js:webpack'], function() {
|
|||
});
|
||||
|
||||
// - min
|
||||
gulp.task('js:min', ['js:app', 'js:admin'], function() {
|
||||
gulp.task('js:es5:min', ['js:app', 'js:admin'], function() {
|
||||
return gulp.src(cfg.paths.staticJS + '*.js')
|
||||
.pipe(ignore.exclude('*.next.js'))
|
||||
.pipe(replace(/"rainloop\/v\/([^\/]+)\/static\/js\/"/g, '"rainloop/v/$1/static/js/min/"'))
|
||||
.pipe(rename({suffix: '.min'}))
|
||||
.pipe(uglify({
|
||||
mangle: true,
|
||||
compress: true
|
||||
compress: true,
|
||||
'screw-ie8': true
|
||||
}))
|
||||
.pipe(eol('\n', true))
|
||||
.pipe(gulp.dest(cfg.paths.staticMinJS))
|
||||
.on('error', gutil.log);
|
||||
});
|
||||
|
||||
gulp.task('js:es6:min', ['js:app', 'js:admin'], function() {
|
||||
return cfg.next ? gulp.src(cfg.paths.staticJS + '*.next.js')
|
||||
.pipe(replace(/"rainloop\/v\/([^\/]+)\/static\/js\/"/g, '"rainloop/v/$1/static/js/min/"'))
|
||||
// TODO
|
||||
.pipe(eol('\n', true))
|
||||
.pipe(rename({suffix: '.min'}))
|
||||
.pipe(gulp.dest(cfg.paths.staticMinJS))
|
||||
.on('error', gutil.log) : true;
|
||||
});
|
||||
|
||||
gulp.task('js:min', ['js:es5:min', 'js:es6:min']);
|
||||
|
||||
// lint
|
||||
gulp.task('js:eslint', function() {
|
||||
return gulp.src(cfg.paths.globjs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue