This repository is a template for starting a JavaScript Single Page Application using Broccoli as the build tool. It supports ES6/ES7 through Babel, and Sass through node-sass. Pages are built using Pug (formerly called 'Jade') templates. JST templates are compiled automatically using Underscore.
By default, the following libraries are included:
- Backbone
- Bootstrap
- Font Awesome
- JQuery
- JSON2
- Leaflet
- Marionette
- Q
- Underscore
To remove them, edit package.json and Brocfile.js.
- Edit the
package.jsonfile to update the application name, license, repository, etc. - Update the
index.pugfile for the application's title and layout - Add in other libraries using NPM, import them using
Brocfile.js, and include them fromindex.pug - Update LICENSE if necessary
- Update this README to explain your application, how to get it running in development, and how to deploy it
- Push the repository to Bitbucket
The template used to use Underscore for the templates, but the broccoli plugins are way outdated. Instead, use Handlebars templates.
- Install handlebars
npm install --save handlebars - Load Handlebars in
Brocfile.jsusingloadLibraryhelper - Upgrade
Brocfile.jsto use Handlebars/concat, and load templates into scripts instead of final mergeTree node - Replace
jsttemplate files withhbsfiles - Replace
window.JSTusage in JS files withwindow.App.Templates
The app is JavaScript and builds using Node.js. To start, install the base Node packages:
$ npm install
Now you can start the local development server:
$ node preview.js
That's all. The server is now running at http://localhost:4200/.
MIT License
James Badger jpbadger@ucalgary.ca