Sails uses Grunt to build the application. As I understand it from the description
sailsjs.org/#!/documentation/concepts/Assets/TaskA...
it does not collect all files in a pile. Supposed to be some plugin for Grunt, which will collect all files in a bunch of (concat), and then make minification. If you combine this with the tracking system isoniemi files (file index), you get the full pipeline (tasks/pipeline.js) to build client side web applications.
In the end, you need to simply determine the order of the files in jsFilesToInject.
requirejs (in Gema for ruby too, and not only as private of Liba, as with other languages backend integration, XS) - elinore.Ebert83 commented on September 19th 19 at 00:14