-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.babel.js
34 lines (30 loc) · 1 KB
/
gulpfile.babel.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
import gulp from 'gulp';
import bs from 'browser-sync';
import consoleTime from './gulp/functions/consoleTime';
import sprite from './gulp/task/sprite';
import image from './gulp/task/image';
import html from './gulp/task/html';
import css from './gulp/task/css';
import js from './gulp/task/js';
global.require = require;
global.dirname = __dirname;
gulp.task('image', () => image());
gulp.task('html', () => html());
gulp.task('css', () => css());
gulp.task('js', () => js());
gulp.task('sprite', () => sprite());
gulp.task('default', ['watch'], () => {
console.log(`${consoleTime()}Frontend Developer Boilerplate by https://github.com/Piotr-Aueternum`);
bs.init({
server: 'dist',
open: false,
});
gulp.watch('dist/assets/**/*.js').on('change', bs.reload);
});
gulp.task('watch', () => {
gulp.watch('src/js/**/*.js', ['js']);
gulp.watch('src/css/**/*.styl', ['css']);
gulp.watch('src/img/**', ['image']);
gulp.watch('src/css/sprites/**', ['sprite']);
gulp.watch('src/**/*.pug', ['html']);
});