-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgulpfile.js
52 lines (45 loc) · 1.56 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
var gulp = require('gulp'),
bowerSrc = require('gulp-bower'),
uglify = require('gulp-uglify'),
rimraf = require('rimraf'),
concat = require('gulp-concat');
gulp.task('bower', function () {
return bowerSrc();
});
gulp.task('bower-extract-bootstrap-fonts', ['bower'], function () {
return gulp
.src([
'bower_components/bootstrap/fonts/*'
])
.pipe(gulp.dest('static/fonts/'));
});
gulp.task('bower-concat-css', ['bower'], function () {
return gulp
.src([
'bower_components/bootstrap/dist/css/bootstrap.css',
'bower_components/bootstrap/dist/css/bootstrap-theme.css',
'bower_components/pace/themes/blue/pace-theme-barber-shop.css',
])
.pipe(concat('bower-deps.min.css'))
.pipe(gulp.dest('static/css/'));
});
gulp.task('bower-concat-js', ['bower'], function () {
return gulp
.src([
'bower_components/angularjs/angular.js',
'bower_components/jquery/dist/jquery.js',
'bower_components/bootstrap/dist/js/bootstrap.js',
'bower_components/pace/pace.js',
'bower_components/bootstrap/js/carousel.js',
])
.pipe(gulp.dest('static/js/deps/'));
});
gulp.task('scripts', ['bower-concat-js', 'bower-concat-css', 'bower-extract-bootstrap-fonts'], function () {
return gulp.
src('static/js/src/*.js')
.pipe(gulp.dest('static/js/'));
});
gulp.task('default', ['scripts'], function () {
rimraf('bower_components', function () {
});
});