View our GitHub

Please visit sails-docs on GitHub to view documentation on your mobile device.

Edit Page

Disabling Grunt

To disable Grunt integration in Sails, simply delete your Gruntfile (and/or tasks/ folder). You can also disable the Grunt hook. Just set the grunt property to false in .sailsrc hooks like this:

    "hooks": {
        "grunt": false

Can I customize this for SASS, Angular, client-side Jade templates, etc?

Yep! Just replace the relevant grunt task in your tasks/ directory, or add a new one. Like SASS for example.

If you still want to use Grunt for other purposes, but don't want any of the default web front-end stuff, just delete your project's assets folder and remove the front-end oriented tasks from the grunt/register/ and grunt/config/ folders. You can also run sails new myCoolApi --no-frontend to omit the assets folder and front-end-oriented Grunt tasks for future projects. You can also replace your sails-generate-frontend module with alternative community generators, or create your own. This allows sails new to create the boilerplate for native iOS apps, Android apps, Cordova apps, SteroidsJS apps, etc.


When removing the grunt hook above you must also specify the following in .sailsrc in order for your assets to be served, otherwise all assets will return a 404.

    "paths": {
        "public": "assets"

Is something missing?

If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails-docs repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.