Closed mhulse closed 11 years ago
Closed by: b687de00119522cd740237885b4be768f14510d4
It might be nice to make functions more "functional" and modular ... For now, it's not needed, so I'm good with how it is. Just saying, the JS could be written better. Closing for now.
On these lines:
https://github.com/mhulse/rex/blob/gh-pages/source/Gruntfile.js#L440-L450
So I can call them in each
dev
andprod
task. If I do this, I'll probably not need the global option.See: https://github.com/gruntjs/grunt-contrib-concat/issues/46
The option presented there is a good solution, but in the case of this code, I think I like the idea of having reusable functions.
Note: I tried accessing
grunt.task.current.args[0]
andthis.args
andthis.name
in theprocess()
function call, but it wasn't working. My thought was to say (pseudocode)if (current task is "dev") { do only dev stuff } else { do xxxxx stuff }
. Real world example:... above code taken from my post here: https://github.com/olizilla/grunt-asciify/issues/2
Love that technique! I thought it could be useful in this situation, but now I think I like the idea of call the individual regexes as I need them depending on the task (for example, not all regexes need to be run if it's a production build).