-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gulpfile.js
45 lines (29 loc) · 1004 Bytes
/
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
38
39
40
41
42
43
44
var gulp = require('gulp'),
browserify = require('gulp-browserify'),
concat = require('gulp-concat'),
imagemin = require('gulp-imagemin');
gulp.task('styles', function () {
gulp.src(['assets/css/typography.css', 'assets/css/styles.css'])
.pipe(concat('styles.css'))
.pipe(gulp.dest('./build/'));
});
gulp.task('scripts', function () {
gulp.src(['assets/js/app.js'])
.pipe(browserify({
debug: true,
transform: [ 'babelify' ]
}))
.pipe(gulp.dest('build/'));
});
gulp.task('images', function () {
gulp.src(['assets/img/**/*.png', 'assets/img/**/*.gif'])
.pipe(imagemin())
.pipe(gulp.dest('build/img/'));
});
gulp.task('dev', function () {
gulp.run('build');
gulp.watch('assets/js/**/*.js', [ 'scripts' ]);
gulp.watch('assets/css/**/*.css', [ 'styles' ]);
gulp.watch('assets/img/**/*', [ 'images' ]);
});
gulp.task('build', [ 'styles', 'scripts', 'images' ]);