2017-06-21 11:15:14 +00:00
|
|
|
const cleanCss = require('gulp-clean-css')
|
|
|
|
const gulp = require('gulp')
|
|
|
|
const rename = require('gulp-rename')
|
|
|
|
const sass = require('gulp-sass')
|
2016-10-25 04:19:29 +00:00
|
|
|
|
2018-01-15 19:36:06 +00:00
|
|
|
gulp.task('default', ['fonts', 'stylesheet'])
|
|
|
|
|
|
|
|
gulp.task('fonts', function () {
|
|
|
|
return gulp.src('./node_modules/font-awesome/fonts/*')
|
|
|
|
.pipe(gulp.dest('./assets/fonts/'))
|
|
|
|
})
|
2016-10-25 04:19:29 +00:00
|
|
|
|
|
|
|
gulp.task('stylesheet', function () {
|
|
|
|
return gulp.src('./assets/stylesheets/index.scss')
|
|
|
|
.pipe(sass().on('error', sass.logError))
|
|
|
|
.pipe(rename('index.bundle.css'))
|
|
|
|
.pipe(gulp.dest('./assets/stylesheets/'))
|
|
|
|
.pipe(cleanCss())
|
|
|
|
.pipe(rename('index.bundle.min.css'))
|
2017-06-21 11:15:14 +00:00
|
|
|
.pipe(gulp.dest('./assets/stylesheets/'))
|
|
|
|
})
|
2016-10-25 04:19:29 +00:00
|
|
|
|
|
|
|
gulp.task('watch', ['default'], function () {
|
2017-06-21 11:15:14 +00:00
|
|
|
gulp.watch('./assets/stylesheets/**/*.scss', ['stylesheet'])
|
|
|
|
})
|