kazhnuz.css/gulpfile.js

57 lines
1.1 KiB
JavaScript
Raw Normal View History

const { src, dest, parallel } = require('gulp');
const include = require('gulp-include');
const sass = require('gulp-sass');
sass.compiler = require('node-sass');
function html() {
return src('src/*.html')
.pipe(include())
.pipe(dest('dist'))
}
function css() {
return src('src/scss/style.scss')
.pipe(sass().on('error', sass.logError))
.pipe(dest('dist'))
}
function js() {
return src('src/js/*.js')
.pipe(dest('dist/js'))
}
2020-01-05 00:10:32 +01:00
function htmladmin() {
return src('src-admin/*.html')
.pipe(include())
.pipe(dest('dist/admin'))
}
function cssadmin() {
return src('src-admin/scss/style.scss')
.pipe(sass().on('error', sass.logError))
.pipe(dest('dist/admin'))
}
function jsadmin() {
return src('src-admin/js/*.js')
.pipe(dest('dist/admin/js'))
}
function dep() {
return src(['dep/**/*'])
.pipe(dest('dist/dep'));
}
function assets() {
return src(['assets/**/*'])
.pipe(dest('dist'));
}
exports.html = html;
exports.css = css;
exports.js = js;
exports.dep = dep;
exports.assets = assets;
2020-01-05 00:10:32 +01:00
exports.default = parallel(html, css, js, dep, assets, htmladmin, cssadmin, jsadmin);