gulp-dotenv-js

1.0.0 • Public • Published

Gulp dotenv js

GitHub last commit Latest Stable Version Jarvis approved GitHub license Twitter

A .env file plugin for gulp: compiling .env to js

Install

Gulp-dotend-js require gulp-rename for change name

$ npm install gulp-rename --save

next you install gulp-dotenv-js

$ npm install gulp-dotenv-js --save

Use

Include gulp-dotenv-js and gulp-rename

var dotenv = require('gulp-dotenv-js');
var rename = require('gulp-rename');
 
gulp.task('dotenv', function () {
  return gulp.src('.env')
    .pipe(dotenvjs())
    .pipe(rename('env.js'))
    .pipe(gulp.dest('dist'));
});

Include

Include env.js file

<script src="assets/dist/js/env.js"></script>

end you can use window.ENV with your options

License

MIT License

Readme

Keywords

Package Sidebar

Install

npm i gulp-dotenv-js

Weekly Downloads

12

Version

1.0.0

License

MIT

Unpacked Size

3.94 kB

Total Files

4

Last publish

Collaborators

  • silverkron