3 ms·
Yeah I totally agree with you here. I had to come up with my own solution to this which took a lot of mental effort. Basically I leveraged the grunt-include-r
by tieTYT 13y ago
Yeah I totally agree with you here. I had to come up with my own solution to this which took a lot of mental effort. Basically I leveraged the grunt-include-replace* plugin to specify a variable in my template file. This variable gets expanded to all the files I depend on. I specify those files with a grunt globbing pattern. There's some logic in between this that converts the file path to script tags.
I really hate the amount of effort this took but it was worth it. I feel like this should be a first class feature/plugin. The problem with lineman's solution is that when you concatenate everything, your stack traces are obfuscated. EG: "An error occurred on line 1,000,000 of concatenated.js". Also, it slows your feedback loop to wait for the concatenation to occur. Also it slows my IDE to view and index a huge concatenated file.
Another thing I hate about grunt's watch plugin is how much code it takes to make the watch plugin only act on the changed files instead of all the files it's watching. EG: When a coffeescript file changes, only compile that file, not all the coffeescript files. That takes like 5 lines of code. It should be an option I can set to true.
* https://github.com/alanshaw/grunt-include-replace https://github.com/alanshaw/grunt-include-replace