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
}
}
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 tasks/register/
and tasks/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"
}
}