Add Templates Html + Gulp Sass + Css + Basic Tree and Files

- Add Templates Html
- Gulp Sass
- Css
- Basic Tree and Files
This commit is contained in:
Mandar
2020-12-04 20:17:51 +01:00
parent 9332985ec7
commit a0a99eb08c
60 changed files with 7771 additions and 34 deletions

67
gulpfile.js Normal file
View File

@@ -0,0 +1,67 @@
// Requires
const gulp = require('gulp');
const prefix = require('gulp-autoprefixer');
const sass = require('gulp-sass');
const browserSync = require('browser-sync');
/* ----------------------------------------- */
/* Compile Sass
/* ----------------------------------------- */
// Small error handler helper function.
function handleError(err) {
console.log(err.toString());
this.emit('end');
}
const SYSTEM_SCSS = ["system/styles/conf/**/*.scss"];
function compileScss() {
// Configure options for sass output. For example, 'expanded' or 'nested'
let options = {
outputStyle: 'compressed'
};
return gulp.src(SYSTEM_SCSS)
.pipe(
sass(options)
.on('error', handleError)
)
.pipe(prefix({
cascade: false
}))
.pipe(gulp.dest("system/styles"))
.pipe(browserSync.reload({
stream: true
}))
}
const css = gulp.series(compileScss);
/* ----------------------------------------- */
/* Watch Updates
/* ----------------------------------------- */
function watchUpdates() {
gulp.watch(SYSTEM_SCSS, css);
}
/* ----------------------------------------- */
/* BrowserSync
/* ----------------------------------------- */
function bSync() {
browserSync({
server: {
baseDir: 'system/styles'
},
})
}
/* ----------------------------------------- */
/* Export Tasks
/* ----------------------------------------- */
exports.default = gulp.series(
compileScss,
watchUpdates,
bSync
);
exports.css = css;