Web Frontend Guidelines

Frontend Tooling

We recommend using lineman

It offers several handy features for front-end development:

  • Browser auto-reloading on file changes
  • Immediately compile CoffeeScript, Less, and client-side templates as you edit source files
  • Provide a development server for fast feedback
  • Concatenate & minify all your CSS & JavaScript for production
  • Run specs on demand with lineman spec using Testem
  • Run specs with output suitable for your CI server using lineman spec-ci

Installation

npm install -g https://github.com/pulilab/lineman/zipball/master

This installs the lineman command.

For browser auto-reloading, you should install a livereload extension

Usage

To start a new project

lineman new <project_name>

This generates our preferred directory structure in the app directory.

To serve it for your browser run

lineman run

To run your tests run

lineman spec

Handlebar templates

Lineman supports underscore and handlebars templates. Handlebars templates should have one of the following file extensions:

  • .hb
  • .handlebar
  • .handlebars

Troubleshooting

The generated and served files are in the generated directory. If you have some mysterious problem, you should check out the generated files first.

Testing

Use lineman’s builtin features. See the Tooling section above for details.

Javascript libraries

We recommend using one of the following JS frameworks:

Moreover, we have a continuously growing collection of articles to read.

Project Versions

Table Of Contents

Previous topic

Django Guidelines

Next topic

Editors

This Page