Git Product home page Git Product logo

sails-js-scaffold's Introduction

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.

sails-js-scaffold's People

Contributors

damassi avatar

Stargazers

Kevin Blanco avatar  avatar Wok avatar John Knott avatar Anders Olsen avatar Jérémie Parker avatar

Watchers

 avatar

sails-js-scaffold's Issues

livereload not working

hey man, i've tried your stuff but the livereload is not working. If I change something is scss files I still have to refresh my browser to see the changes ..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.