forked from treyhunner/custom-bootstrap-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
executable file
·44 lines (39 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
38
39
40
41
42
43
44
var gulp = require('gulp');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var pump = require('pump');
var config = {
nodeModulesDir: './node_modules',
publicDir: './public',
};
gulp.task('fonts', function(callback) {
pump([
gulp.src([
config.nodeModulesDir + '/bootstrap-sass/assets/fonts/**/*',
]),
gulp.dest(config.publicDir + '/fonts')
], callback);
});
gulp.task('js', function(callback) {
pump([
gulp.src([
config.nodeModulesDir + '/jquery/dist/jquery.min.js',
config.nodeModulesDir + '/bootstrap-sass/assets/javascripts/bootstrap.min.js',
config.nodeModulesDir + '/holderjs/holder.min.js',
]),
gulp.dest(config.publicDir + '/js')
], callback);
});
gulp.task('css', function(callback) {
pump([
gulp.src('css/app.scss'),
sourcemaps.init(),
sass({
outputStyle: 'compressed',
includePaths: [config.nodeModulesDir + '/bootstrap-sass/assets/stylesheets'],
}),
sourcemaps.write(),
gulp.dest(config.publicDir + '/css')
], callback);
});
gulp.task('default', ['css', 'js', 'fonts']);