grunt-text-replace
grunt-text-replace copied to clipboard
Doesn't work at all - constant loop
I've installed and configured the package correctly. Upon running "grunt replace" it just sits there. I ran "grunt replace -v" and it shows that it's just constantly running "replace" task over and over indefinitely. It never actually makes any changes or ends the stask.
Here's the console. Here's my setup. I changed the source links and regex to generics to maintain privacy of the project I'm working on. Note, I excluded "dest" because I want to overwrite. I also tried with "dest" and had the same results
you may want to check your setup, I've gotten it to work fine. Here's my setup
grunt.initConfig....
replace: {
asset_properties_version: {
src: ['<%= config.assets_properties_dir%>/<%= config.assets_properties_filename%>'],
overwrite: true, // overwrite matched source files
replacements: [{
from: /asset_version=[0-9]{14}/g,
to: "asset_version=<%= executionTime %>"
}]
}
}
});
grunt.loadNpmTasks('grunt-text-replace');
grunt.registerTask('update_asset_version','Updates the assets.properties value for the asset_version key', ['replace:asset_properties_version']);
i have this problem too. use your setup but also loop