Reputation: 80495
Let's say you have a file that contains these 2 vars, but also other content
//Other code above
var endpoint='...';
var redirectUrl='...';
//Other code below
Now, is there a way for Grunt to change the value of those vars depending on build params?
Thanks.
Upvotes: 0
Views: 26
Reputation: 13725
If you enclose your line with something easily matchable. (Or if the original values are unique enough, it can be fine as well.)
You can use this plugin:
https://github.com/outaTiME/grunt-replace
To replace it with something else.
Upvotes: 1