forked from HunterLarco/voxel.css
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
34 lines (29 loc) · 866 Bytes
/
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
/* jshint strict: false, node: true */
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var jshint = require('gulp-jshint');
var concat = require('gulp-concat');
var mincss = require('gulp-minify-css');
var addsrc = require('gulp-add-src');
var del = require("del");
gulp.task('clean', function(){
del('dist/*');
});
gulp.task('dist', function(){
gulp.src('./src/interfaces/*.js')
.pipe(addsrc('./src/core/*.js'))
.pipe(addsrc('./src/ext/*.js'))
.pipe(uglify())
.pipe(concat('voxelcss.js'))
.pipe(gulp.dest('./dist'));
gulp.src('./src/voxel.css')
.pipe(mincss({compatibility: 'ie8'}))
.pipe(gulp.dest('./dist'));
});
gulp.task('lint', function(){
return gulp.src('./src/*/*.js')
.pipe(jshint())
.pipe(jshint.reporter('default'))
.pipe(jshint.reporter('fail'));
});
gulp.task('default', ['build']);