forked from Dmytro-Medzatiy/react-ui-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
45 lines (40 loc) · 1.36 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
var gulp = require('gulp'),
less = require('gulp-less'),
del = require('del'),
autoprefixer = require('gulp-autoprefixer'),
sourcemaps = require('gulp-sourcemaps');
babel = require('gulp-babel');
concat = require('gulp-concat');
uglify = require('gulp-uglify');
watch = require('gulp-watch');
gulp.task('default', function() {
// place code for your default task here
});
gulp.task('build-server-dev', function() {
return gulp.src('server/src/**/*.js')
.pipe(watch('server/src/**/*.js'))
.pipe(babel())
.pipe(gulp.dest('build/lib'));
});
gulp.task('build-server', function() {
return gulp.src('server/src/**/*.js')
.pipe(babel())
.pipe(uglify())
.pipe(gulp.dest('build/lib'));
});
gulp.task('less-bootstrap', ['clean'], function() {
var config = {
src: './client/lib/bootstrap/less/bootstrap.less',
dest: './client/lib/bootstrap/css/custom'
};
return gulp.src(config.src)
//.pipe(sourcemaps.init())
.pipe(less())
.pipe(autoprefixer({cascade: false, browsers: ['last 2 versions']}))
//.pipe(sourcemaps.write())
.pipe(gulp.dest(config.dest, {overwrite: true}));
});
gulp.task('clean', function(cb) {
// You can use multiple globbing patterns as you would with `gulp.src`
del(['./client/lib/bootstrap/css/custom'], cb);
});