choosing assets sailsjs
express, javascript, sails.js
Solution
Glad you're liking Sails :)
For now, you can (a) bring in all styles all the time and make only the relevant ones apply (b) use another tool (like Grunt) to bundle assets like you would in a vanilla node.js project or (c) link the stylesheets manually (put them in your public folder).
As for the roadmap-- the community is working on more options for serving templates/styles/client-side logic. There's an open spec here:
https://github.com/balderdashy/sails/issues/240
Hope that helps!
Problem
I've started using SailsJS for a small web app and so far it's great. However I'm struggling with the assets and layout. Basically I would like to be able to use different type of assets (groups of css files) depending on the page. For this, I wrote 2 different layouts, each should includes the correct css files. However, when I add those files in the `config/assets.js` files there all bundled together. Is there a way to specifiy in my layout which assets i want to use ? I know you can specify `assets.js` or `assets.styles` but I would like to be able to create my own group . I also tried to put those assets in a different directory (public for example) and load them manually in my layout. It's still not working because the server doesn't want to 'serve' them. Any idea ?