This is a base template that includes the following features already configured based on nodejs.
- NodeJS
- Express server to run the project
- requirejs with text plugin
- BackBone
- Lodash
- Twitter Bootstrap v3.x
- jQuery
- less support
- Grunt to complile it into 1 js/css file with mapping files
You need grunt installed globally:
$ npm install -g grunt
Git clone the code to your system and install
$ git clone https://github.com/paulrichards19/require-backbone-template.git
$ cd require-backbone-template
$ npm install
To run the server:
$ node server.js
Go to http://localhost:3001/index.html to view site. public/js/app can contain all the backbone files. Main.js has the configuration and public/js/app/App.js is the application entry point.
To build all files in to optimized JavaScript and CSS run:
$ grunt
You can then find all the files in the build folder.
$ grunt buildless
This will watch /public/css/less directory for changes and update /public/css/styles.css.
MIT