gulp-process-env

0.0.2 • Public • Published

gulp-process-env

Build Status

A utility to allow setting and restoring of environment variables for streams, specifically with gulp.

  var jasmine = require('gulp-jasmine');
  var processEnv = require('gulp-process-env')
  
  var env = processEnv({NODE_ENV: 'test', other: 'property});
  
  gulp.src('**/*.js')
    .pipe(env)           // Sets the environment
    .pipe(jasmine())     // Jasmine gulp task runs with NODE_ENV test
    .pipe(env.restore()) // NODE_ENV is restored back to the original state

Package Sidebar

Install

npm i gulp-process-env

Weekly Downloads

18

Version

0.0.2

License

MIT

Last publish

Collaborators

  • rdy