This repository has been archived on 2022-11-21. You can view files and clone it, but cannot push or open issues or pull requests.
kspace-static/gulpfile.js

42 lines
774 B
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'))
}
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;
exports.default = parallel(html, css, js, dep, assets);