-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
40 lines (35 loc) · 964 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
var gulp = require('gulp');
var bower = require('gulp-bower');
var uglify = require('gulp-uglify');
var pump = require('pump');
var connect = require('gulp-connect');
gulp.task('default', ['build']);
gulp.task('build', ['copy', 'js', 'bower']);
gulp.task('copy', function() {
gulp.src(['**/*.html', '**/*.png', '**/*.jpg', '**/*.svg', 'samples/**/*', '!dist/**/*', '!node_modules/**/*', '!lib/**/*'])
.pipe(gulp.dest('dist'));
gulp.src(['samples/**/*'])
.pipe(gulp.dest('dist/samples'));
gulp.src(['css/**/*.css'])
.pipe(gulp.dest('dist/css'));
gulp.src(['fonts/**/*'])
.pipe(gulp.dest('dist/fonts'));
});
gulp.task('js', function (cb) {
pump([
gulp.src('js/**/*.js'),
uglify(),
gulp.dest('dist/js')
],
cb
);
});
gulp.task('bower', function() {
return bower()
.pipe(gulp.dest('dist/lib'))
});
gulp.task('serve', function() {
connect.server({
port: 8080
});
});