-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
39 lines (31 loc) · 1.13 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
var gulp = require('gulp');
var fs = require('fs');
var less = require('gulp-less');
gulp.task('copy-react-bootstrap', function () {
if(fs.existsSync(__dirname + '/node_modules/react-bootstrap')) {
gulp.src([__dirname + '/node_modules/react-bootstrap/*.js',
__dirname + '/node_modules/react-bootstrap/**/*.js'
])
.pipe(gulp.dest('react-bootstrap'));
}
});
gulp.task('compile-bootstrap', function () {
gulp.src('bootstrap.less')
.pipe(less())
.pipe(gulp.dest('bootstrap/css'));
});
//gulp.task('copy-bootstrap-css', function () {
// if(fs.existsSync(__dirname + '/node_modules/bootstrap')){
// gulp.src([__dirname + '/node_modules/bootstrap/dist/css/bootstrap-theme.min.css',
// __dirname + '/node_modules/bootstrap/dist/css/bootstrap.min.css'])
// .pipe(gulp.dest('bootstrap/css'));
// }
//});
gulp.task('copy-bootstrap-fonts', function () {
if(fs.existsSync(__dirname + '/node_modules/bootstrap')){
gulp.src(__dirname + '/node_modules/bootstrap/dist/fonts/*')
.pipe(gulp.dest('bootstrap/fonts'));
}
});
gulp.task('default', ['copy-react-bootstrap', 'compile-bootstrap', 'copy-bootstrap-fonts'], function () {
});