-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathgulpfile.js
30 lines (24 loc) · 824 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
'use strict';
var gulp = require('gulp');
var plugins = require('gulp-load-plugins')();
gulp.task('clean', function(done) {
return gulp.src('lib/cassette.js',
{read:false}).pipe(plugins.clean());
});
gulp.task('buildjs', ['clean'], function() {
return gulp.src('src/cassette.jsx').pipe(plugins.react()).pipe(gulp.dest('lib'));
})
gulp.task('default', ['buildjs']);
// needs to be ran with the --harmony flag, which is included in the `npm test` script.
gulp.task('jest', ['default'], function () {
return gulp.src('__tests__').pipe(plugins.jest({
scriptPreprocessor: './support/preprocessor.js',
unmockedModulePathPatterns: ['node_modules/react'],
testPathIgnorePatterns: ['support'],
moduleFileExtensions: [
'js',
'json',
'react'
]
}));
});