grunt-useref icon indicating copy to clipboard operation
grunt-useref copied to clipboard

Keep build blocks after renaming

Open niksumeiko opened this issue 10 years ago • 0 comments

Build blocks are removed after renaming. This prevents continues renaming for future versions deploys.

According to the documentation, HTML tag that includes the file to be renamed wrapped into build block is replaced with just a HTML tag with a new filename. So, build block with its contents:

<!-- build:js ./main-<%= grunt.file.readJSON('package.json').version %>.js -->
<script src="./main.js"></script>
<!-- endbuild -->

is replaced with just its contents with an updated filename:

<script src="./main-1.0.2.js"></script>

When a new static resources version is ready to be deployed, executing Grunt task grunt useref is not renaming filenames anymore. It happens only because build comment blocks were removed in a previous grunt useref execution.

Would be nice to have Grunt task option (optional) that flags the task to keep build block comments.

niksumeiko avatar Apr 17 '14 09:04 niksumeiko