1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

fix: switch to using the handy gulp-process-env plugin

This commit is contained in:
Benjamin Coe 2016-11-17 08:45:14 -08:00
parent 12003f307b
commit 5e2b426d33
No known key found for this signature in database
GPG key ID: 60AB1C1D478E1286
2 changed files with 5 additions and 1 deletions

View file

@ -8,6 +8,7 @@ const benchmark = require('gulp-benchmark')
const sequence = require('run-sequence')
const webpack = require('webpack-stream')
const del = require('del')
const processEnv = require('gulp-process-env')
const babelOptions = JSON.parse(fs.readFileSync('.babelrc', 'utf-8'))
@ -134,12 +135,14 @@ gulp.task('build-client', ['compile-lib', 'compile-client'], () => {
})
gulp.task('test', () => {
process.env.NODE_ENV = 'test'
const env = processEnv({NODE_ENV: 'test'})
return gulp.src('test/**/**.test.js')
.pipe(env)
.pipe(ava({
verbose: true,
nyc: true
}))
.pipe(env.restore())
})
gulp.task('bench', ['compile', 'copy', 'compile-bench', 'copy-bench-fixtures'], () => {

View file

@ -109,6 +109,7 @@
"gulp-benchmark": "1.1.1",
"gulp-cached": "1.1.1",
"gulp-notify": "2.2.0",
"gulp-process-env": "0.0.2",
"husky": "0.11.9",
"nyc": "9.0.1",
"run-sequence": "1.2.2",