/portfolio2014

yay!

Primary LanguageCoffeeScript

Chaplin with Controllers

Documentation

Brunch with Chaplin

bwc-logo

This is HTML5 application, built with Brunch and Chaplin.

Getting started

  • Install (if you don't have them):

Project Installation

  • Install:
    • Clone this repo
    • Run npm install in the root directory to install all Brunch packages
    • Run bower install in the root directory to install all project dependencies
  • Workflow:
    • brunch watch --server — watches the project with continuous rebuild. This will also launch HTTP server with pushState.
    • brunch watch -s -p xxxx watches the project and launches the HTTP server on port XXXX.
    • brunch build --production — builds minified project for production
    • public/ dir is fully auto-generated and served by HTTP server. Write your code in app/ dir.
    • Place static files you want to be copied from app/assets/ to public/.
    • Brunch site, Chaplin site

Using Scaffolt

Scaffolt is a command-line scaffolding tool built to help you generate skeleton Chaplin objects in your project.

In our project we can use it as an easy way to generate the skeleton views, controllers, models, templates and stylesheets we need.

Usage:

$ scaffolt style photos-main -p app/views/photos/styles
$ scaffolt template photos -p app/views/photos/templates
$ scaffolt view photos -p app/views/photos
$ scaffolt controller photos -p app/controllers
$ scaffolt model photo -p app/models/photos

This will create a photos-main.styl file in the directory app/views/photos/styles, a photos.hbs file in the directory app/views/photos/templates, etc.

Refer to the Scaffolt README for more information