gulp-inject-envs

    1.1.1 • Public • Published

    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

    Keywords

    none

    Install

    npm i gulp-inject-envs

    DownloadsWeekly Downloads

    85

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    4.07 kB

    Total Files

    5

    Last publish

    Collaborators

    • tiaanduplessis