gulp-inject-envs
Gulp plugin to inject environment variables
Last updated 2 years ago by tiaanduplessis .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install gulp-inject-envs 
SYNC missed versions from official npm registry.

gulp-inject-envs

package version package downloads standard-readme compliant package license make a pull request

Gulp plugin to inject environment variables

Table of Contents

About

Inject variables with configurable prefix. Based on gulp-inject-env-variables.

Install

This project uses node and npm.

$ npm install gulp-inject-envs
$ # OR
$ yarn add gulp-inject-envs

Usage

const injectEnvs = require('gulp-inject-envs')
const env = { foo: 'bar', ping: 'pong' }

gulp.src('**/*.js')
  .pipe(injectEnvs(env)) // set custom prefix with second argument e.g. {prefix: 'CUSTOM___' }
  .pipe(gulp.dest('/'))

And in code:

const foo = '<ENV::foo>'
console.log(foo) // bar

Contribute

  1. Fork it and create your feature branch: git checkout -b my-new-feature
  2. Commit your changes: git commit -am 'Add some feature'
  3. Push to the branch: git push origin my-new-feature
  4. Submit a pull request

License

MIT

Current Tags

  • 1.1.1                                ...           latest (2 years ago)

5 Versions

  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Total 536
Today 0
This Week 1
This Month 0
Last Day 1
Last Week 7
Last Month 20
Dependencies (1)
Dev Dependencies (1)
Dependents (1)

Copyright 2014 - 2021 © npmmirror.com |