-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gulpfile.js
47 lines (40 loc) · 1.01 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');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var plumber = require('gulp-plumber');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
var minifyCSS = require('gulp-minify-css');
var paths = {
src: "src/Camera.js",
dist: "dist/",
}
gulp.task('default', ['watch', 'build']);
gulp.task('build', function() {
return gulp.src(paths.src)
.pipe(plumber())
.pipe(gulp.dest(paths.dist))
.pipe(uglify())
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest(paths.dist));
});
gulp.task('watch', function() {
gulp.watch(paths.src, ['build']);
});
gulp.task('demo-web', function() {
gulp.src('demos/web/styles/**.scss')
.pipe(plumber())
.pipe(sass().on('error', sass.logError))
.pipe(autoprefixer({
browsers: ['last 3 versions'],
cascade: false
}))
//.pipe(gulp.dest('demos/web/styles/'))
.pipe(minifyCSS())
.pipe(rename({
suffix: ".min"
}))
.pipe(gulp.dest('demos/web/styles/'));
});