Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

How to configure usemin to only replace the files with the revved version of the filerev task #456

Open
Avien opened this issue Oct 19, 2014 · 7 comments
Assignees
Labels

Comments

@Avien
Copy link

Avien commented Oct 19, 2014

I don't want concatenation or uglification or to replace all the blocks in the html, I only want the usemin to replace the files with the revved version create by filerev task.
However I still want to have the blocks defined in the html for full dist version (with uglify+concat etc...)

How is that possible?
Thanks

@Avien Avien changed the title Hot to configure usemin to only execute the filerev task Hot to configure usemin to only replace the files with the revved version of the filerev task Oct 19, 2014
@stephanebachelier
Copy link
Collaborator

@Avien, just an idea, but have you tried not to run the *min:generated tasks ?
In your task list, instead of :

 - useminPrepare
 - concat
 - cssmin
 - uglify
 - filerev
 - usemin

you do:

 - useminPrepare
 - concat:mysubtask
 - cssmin:mysubtask
 - uglify:mysubtask
 - filerev
 - usemin

where mysubtask is not generated, you should prevent block replacement.

But what do you want to achieve but replacing files with revved version? Is it a scenario where you want to build a non-minified dist version, but still be able to build a full minified revved version ?

@Avien
Copy link
Author

Avien commented Oct 25, 2014

Exactly
I want to build a debug able dist version which will always be deployed next to the minified version

Commenting the tasks in the build tasks alone did not work, it would still generate a minified version

Sent from my iPhone

On 25 באוק 2014, at 03:31, Stéphane Bachelier notifications@github.com wrote:

@Avien, just an idea, but have you tried not to run the *min:generated tasks ?
In your task list, instead of :

  • useminPrepare
  • concat
  • cssmin
  • uglify
  • filerev
  • usemin
    you do:
  • useminPrepare
  • concat:mysubtask
  • cssmin:mysubtask
  • uglify:mysubtask
  • filerev
  • usemin
    where mysubtask is not generated, you should prevent block replacement.

But what do you want to achieve but replacing files with revved version? Is it a scenario where you want to build a non-minified dist version, but still be able to build a full minified revved version ?


Reply to this email directly or view it on GitHub.

@stephanebachelier
Copy link
Collaborator

@Avien in my experience I never deploy debugable version on server, except if something fails, which means that I've setup my grunt tasks to build either a full optimized (minified+revved) version or a not optimized. Is it something you can consider ?
If not I will take a look at building the two version (minified and non minified) at the same time. I think it's possible. Let me know.

@stephanebachelier stephanebachelier self-assigned this Oct 26, 2014
@stephanebachelier
Copy link
Collaborator

ping @Avien

@Avien
Copy link
Author

Avien commented Nov 2, 2014

Actually I managed to skip the uglification task and copy the concatenated files to the dist folder to be revved by using grunt copy
I think uglification does the copy inside?

@stephanebachelier stephanebachelier changed the title Hot to configure usemin to only replace the files with the revved version of the filerev task How to configure usemin to only replace the files with the revved version of the filerev task Nov 3, 2014
@stephanebachelier
Copy link
Collaborator

@Avien I think the #487 should solve your problem in a better way. No need to have two differents workflow.

@stephanebachelier
Copy link
Collaborator

@Avien I confirm the #487 should probably cover your need and but not a duplicate of #487.
I add the docs tag as we should add your use case in documentation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants