forked from elixirscript/elixirscript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
25 lines (20 loc) · 813 Bytes
/
gulpfile.js
File metadata and controls
25 lines (20 loc) · 813 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
var gulp = require('gulp');
var mocha = require('gulp-mocha');
var concat = require('gulp-concat');
var babel = require('gulp-babel');
gulp.task('dist', function() {
return gulp.src(['./priv/alphonse/lib/**/*.js'])
.pipe(babel({sourceMap: false, modules:'ignore'}))
.pipe(concat('elixir.js'))
.pipe(gulp.dest('./priv/alphonse/dist'));
});
gulp.task('build', function() {
return gulp.src(['./priv/alphonse/**/*.js', '!./priv/alphonse/build/**/*.js', '!./priv/alphonse/*.js'])
.pipe(babel({sourceMap: false, modules:'common'}))
.pipe(gulp.dest('./priv/alphonse/build'));
});
gulp.task('test',['build'], function () {
return gulp.src('./priv/alphonse/build/tests/**/*.spec.js', {read: false})
.pipe(mocha({reporter: 'nyan'}));
});
gulp.task('default', ['build', 'test']);