Edit Page

Gruntfile.js

Sails uses Grunt for asset management. This file contains the entry point for the default asset pipeline in Sails; that is, the code that does stuff like compiling LESS stylesheets, minifying scripts for production, and precompiling and injecting client-side templates.

Sails' integration with Grunt is fully customizable, but for most use cases, this file (Gruntfile.js) should remain unchanged. Instead, you can install Grunt plugins or add your own custom logic as new files in the tasks/ folder.

Want to see for yourself?

An example of this file can be found in our sample app repo, here.

Anatomy of a Sails App