mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Found the round npm module to get rollup working in gulp
This commit is contained in:
parent
90ee39b114
commit
8b1a7f39df
11 changed files with 72 additions and 143 deletions
38
tasks/css.js
38
tasks/css.js
|
|
@ -51,30 +51,6 @@ const cssMainBuild = () => {
|
|||
.pipe(livereload());
|
||||
};
|
||||
|
||||
const cssAdminBuild = () => {
|
||||
const autoprefixer = require('gulp-autoprefixer'),
|
||||
less = require('gulp-less'),
|
||||
lessFilter = filter('**/*.less', { restore: true }),
|
||||
src = config.paths.less.admin.src;
|
||||
|
||||
return gulp
|
||||
.src(src)
|
||||
.pipe(expect.real({ errorOnFailure: true }, src))
|
||||
.pipe(lessFilter)
|
||||
.pipe(
|
||||
less({
|
||||
'paths': config.paths.less.main.options.paths
|
||||
})
|
||||
)
|
||||
.pipe(lessFilter.restore)
|
||||
.pipe(concat(config.paths.css.admin.name))
|
||||
.pipe(autoprefixer())
|
||||
.pipe(replace(/\.\.\/(img|images|fonts|svg)\//g, '$1/'))
|
||||
.pipe(eol('\n', true))
|
||||
.pipe(gulp.dest(config.paths.staticCSS))
|
||||
.pipe(livereload());
|
||||
};
|
||||
|
||||
const cssBootMin = () => {
|
||||
const cleanCss = require('gulp-clean-css');
|
||||
return gulp
|
||||
|
|
@ -95,18 +71,8 @@ const cssMainMin = () => {
|
|||
.pipe(gulp.dest(config.paths.staticCSS));
|
||||
};
|
||||
|
||||
const cssAdminMin = () => {
|
||||
const cleanCss = require('gulp-clean-css');
|
||||
return gulp
|
||||
.src(config.paths.staticCSS + config.paths.css.admin.name)
|
||||
.pipe(cleanCss())
|
||||
.pipe(rename({ suffix: '.min' }))
|
||||
.pipe(eol('\n', true))
|
||||
.pipe(gulp.dest(config.paths.staticCSS));
|
||||
};
|
||||
|
||||
const cssBuild = gulp.parallel(cssBootBuild, cssMainBuild/*, cssAdminBuild*/);
|
||||
const cssMin = gulp.parallel(cssBootMin, cssMainMin, cssAdminMin);
|
||||
const cssBuild = gulp.parallel(cssBootBuild, cssMainBuild);
|
||||
const cssMin = gulp.parallel(cssBootMin, cssMainMin);
|
||||
|
||||
const cssLint = (done) => done();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue