forked from webpack/postcss-loader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
28 lines (23 loc) · 803 Bytes
/
gulpfile.js
File metadata and controls
28 lines (23 loc) · 803 Bytes
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
var gulp = require('gulp');
gulp.task('clean', function (done) {
var fs = require('fs-extra');
fs.remove(__dirname + '/build', done);
});
gulp.task('lint', function () {
var jshint = require('gulp-jshint');
return gulp.src(['index.js', 'test/*.js', 'gulpfile.js'])
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'))
.pipe(jshint.reporter('fail'));
});
gulp.task('build', ['clean'], function () {
var webpack = require('gulp-webpack');
return gulp.src('')
.pipe(webpack(require('./test/webpack.config')))
.pipe(gulp.dest('build/'));
});
gulp.task('test', ['build'], function () {
var mocha = require('gulp-mocha');
return gulp.src('build/*.js', { read: false }).pipe(mocha());
});
gulp.task('default', ['lint', 'test']);