I have an app
folder where I want to replace http://localhost:8000
for http://fomoapp-melbourne.rhcloud.com
in two files: companies-list.component.ts
and events-list.component.ts
. I am trying to use grunt-replace-string
plugin and it seemingly runs successfully with green Done
result and no errors, but no replacement happens.
Here is how Gruntfile.js
looks like:
module.exports = function(grunt){
[
'grunt-string-replace',
].forEach(function(task){
grunt.loadNpmTasks(task);
});
// configure plugins
grunt.initConfig({
'string-replace': {
dist: {
files: {
'./app/': ['companies-list.component.ts','events-list.component.ts'],
},
options: {
replacements: [{
pattern: 'http://localhost:8000',
replacement: 'http://fomoapp-melbourne.rhcloud.com',
}]
}
}
},
});
// register tasks
grunt.registerTask('default', ['string-replace']);
};