-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
37 lines (32 loc) · 1.05 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const gulp = require('gulp');
const autoprefixer = require('gulp-autoprefixer');
const sass = require('gulp-sass');
const sourcemaps = require('gulp-sourcemaps');
const plumber = require('gulp-plumber');
const sassInput = './stylesheets/*.scss';
const sassOptions = {
includePaths: ['node_modules/foundation-sites/scss','node_modules/@fortawesome/fontawesome-free/scss'],
errLogToConsole: true,
outputStyle: 'expanded'
}
function styles() {
return gulp.src(sassInput)
.pipe(plumber())
.pipe(sourcemaps.init())
.pipe(sass(sassOptions).on('error', sass.logError))
.pipe(autoprefixer())
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./public/css'));
};
exports.styles = styles;
function fonts() {
return gulp.src('node_modules/@fortawesome/fontawesome-free/webfonts/**.*')
.pipe(gulp.dest('./public/webfonts'));
}
exports.fonts = fonts;
function watching() {
gulp.watch(sassInput, sass);
}
exports.watching = watching;
exports.dev = gulp.series(gulp.parallel(styles,fonts), watching);
exports.default = gulp.parallel(styles, fonts);