gulp-renvy
A configurable gulp plugin very inspired by gulp-replace that replace enviroment placeholders simply by passing a placeholder config object.
Install
Use npm for install the package
npm install gulp-renvy
How it works
In your gulpfile.js import gulp-renvy and call it in a pipe renvy(<placeholder object>,<enviroment:String>)
. For how to define a placeholder object give a look to the following example.
Example
in the gulpfile.js
var renvy = ; var placeholder = 'BASE_HREF': 'production':'/rejseforsikring/' 'stage':'/rejseforsikring/' 'RAVEN_DEV': 'production':false 'stage':true 'API_PATH_P': 'production':'/api' 'stage':'/api-dev';// production and stage are the enviroments;// BASE_HREF, RAVEN_DEV and API_PATH_P are the placeholders that you can place in your html code gulp; ...
TODO
- tests