grunt-text-replace icon indicating copy to clipboard operation
grunt-text-replace copied to clipboard

Doesn't work at all - constant loop

Open JMLdev opened this issue 7 years ago • 2 comments

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

JMLdev avatar May 19 '17 17:05 JMLdev

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']);

chrisjohnson00 avatar Jun 05 '17 20:06 chrisjohnson00

i have this problem too. use your setup but also loop

Rainnut avatar Jun 08 '18 09:06 Rainnut