🚀 Socket Launch Week 🚀 Day 5: Introducing Socket Fix.Learn More
Socket
Sign inDemoInstall
Socket

gulp-inject-envs

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-inject-envs

Gulp plugin to inject environment variables

1.0.1
Source
npm
Version published
Weekly downloads
47
14.63%
Maintainers
1
Weekly downloads
 
Created
Source

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

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

License

MIT

FAQs

Package last updated on 20 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts