I'm relatively new to grunt and I'm working to concat my files. I've been digging and haven't been able to come up with a good answer for this:

concat({
    src : ['file1.js', ...all other files... ],
    dest : 'dist/build.js'
});

Where file1.js is always added first, then it pulls in all remaining files. I could do it all by hand, but in the spirit of automation I was hoping to find a more dynamic method.

有帮助吗?

解决方案

src is just a simple array which you can of course fill dynamically. e.g. you can read the files manually, sort them by whatever you want, and add that array to your config!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top