Skip to content

Latest commit

 

History

History
executable file
·
94 lines (66 loc) · 4.07 KB

README.md

File metadata and controls

executable file
·
94 lines (66 loc) · 4.07 KB

Introduction

Chapless Brunch is a skeleton for building web applications, specifically single-page applications. It is a modification of Brunch with Chaplin. While Brunch can be used to run commands, tasks are also supplied via cake.

Requirements

Setup

  1. Install node.js.
  2. While not mandatory, it is recommended to install CoffeeScript.
  3. Download this skeleton.
  4. Open a Terminal / Command Prompt and navigate to this directory where you downloaded the skeleton.
  5. Execute the command npm install to install all package dependencies.

Command List

While Brunch commands can be used, cake commands are provided for this skeleton. These tasks can be executed using cake if it is installed. (cake [command]) If cake is not installed these commands can also be executed using npm. (npm run-script [command]) These are the following commands (this list is accessible using either the command cake or npm start):

Extras

These commands add additional features/items to the project that are not included by default. It is recommended to add these features in the beginning when setting up the project as they overwrite certain files.

add:bootstrap

Add Twitter Bootstrap and Font Awesome to the project. LESS-based files are provided for full customization. It is recommended that you add @import "vendor/styles/bootstrap/variables"; to base.less.

add:stickit

Add Backbone.stickit to the project.

Scaffolding

These commands allow one to generate and destroy Chaplin components.

  • Test files are automatically generated for each of these items.
  • For views, a template and stylesheet is also provided in addition to the code file.

gen:model / del:model

Generate/destroy a Chaplin model.

gen:collection / del:collection

Generate/destroy a Chaplin collection. Generating a Chaplin collection will also generate its corresponding model. Specify the name in singular form, as collection will automatically be pluralized.

gen:view / del:view

Generate/destroy a Chaplin view.

gen:view:collection / del:view:collection

Generate/destroy a Chaplin collection view. Generating a Chaplin collection view will also generate the individual model item view.

gen:controller / del:controller

Generate/destroy a Chaplin controller.

Building

These commands are used to assemble the application, generating the necessary JS/CSS and adding assets. Use dev mode to keep readable JS/CSS and include tests under the test/ folder. Use prod mode to minify/uglify JS/CSS and omit tests.

build:[mode]

Assemble the application once.

watch:[mode]

Assemble the application and continue to watch for changes. Rebuild every time a change is detected.

server:[mode]

Assemble the application and continue to watch for changes. Rebuild every time a change is detected. Also, the application is served locally to open with a browser. This build uses the web environment.

Testing

Use the test command to execute tests in the terminal using jsdom.

Details

Core

Languages

Framework

Utilities

Styling

Extras