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:
parent
12003f307b
commit
5e2b426d33
|
@ -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'], () => {
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue