GitXplorerGitXplorer
d

sails-js-scaffold

public
6 stars
0 forks
1 issues

Commits

List of commits on branch master.
Unverified
8987f25d60c00e86c2efd71f2a4a722dbb4b0a1a

Renamed `frontend to `client-side` for clarity

ddamassi committed 11 years ago
Unverified
e4235d4d9f653b771eb498f509608ee1a8289914

Updated readme

ddamassi committed 11 years ago
Unverified
c9a8193e502d30f3d7b61d7f1554cf625b657897

Updated image path

ddamassi committed 11 years ago
Unverified
6aa1e1d4c7706df37c0a6d65b607d0a4c9f527c4

Moved vendor directory to frontend

ddamassi committed 11 years ago
Unverified
2d9b7d4864b45a10ab941a534a4d116aca57282f

Restructured how frontend is handled and refactored gruntfile to include grunt concurrent / watch

ddamassi committed 11 years ago
Unverified
e12179e3581787e7ac74df0a851d7eebad911f8d

Updated gruntfile and readme

ddamassi committed 11 years ago

README

The README file for this repository.

Sails.js Grunt Scaffold

An alternative Sails.js Grunt scaffold which enables live-reload for both the server and the client (via Nodemon and contrib-watch), substitutes LESS for SASS, script concatenation for Browserify, sets up a basic grunt-mocha task for Mocha tests as well as provides a number of commonly used front-end libraries located in vendor --the Gumby SASS framework, jQuery, Backbone, Lo-dash, GreenSock Animation Platform, and Modernizer.

Installation

  • Initialize a new Sails app by running sails new <app>
  • Clone https://github.com/damassi/sails-js-scaffold.git into the newly created app folder, overwriting the existing package.json and GruntFile.js.
  • Install dependencies: npm install
  • Start app: grunt concurrent

(Note: grunt concurrent is used instead of sails lift due to the need to both restart the server on changes as well as watch for file changes on the frontend)

Configuring Scaffold

Currently the Sails framework requires that three Grunt tasks tasks be included by default: linkAssets, build and prod. While linkAssets no longer needs to be used as the default sails-linker npm module has been removed, build and prod still need to be configured depending upon your desired build and production needs. I've left these intentionally blank. Additionally, if certain vendor libraries are not needed you can remove them from the concat:vendor task located at the top of the grunt-file.

Configuring Base Views

In views/layout.ejs the base, default view used to render Sails.js pages can be modified to fit your needs. If the paths to your application sources needs to be changed, then the base-paths located at the top of GruntFile.js need to be changed accordingly.