Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
app
assets
coffee
dist
tasks
tests
favicon.ico
grunt.js
index.html
index.noconfig.html
package.json
readme.md

readme.md

Demo

The demo is using coffee-script/bbb/amd/backbone/jasmine together.

Build process

  • Install dependencies: bbb/coffee-script/grunt-jasmine-task
$ npm install .
  • Install phantomjs following grunt faq

  • Build and Run the server

Compile the coffee to js

$ ./node_modules/bbb/bin/bbb coffee

Run the server

$ ./node_modules/bbb/bin/bbb
$ ./node_modules/bbb/bin/bbb server

Run jasmine tests

$ ./node_modules/bbb/bin/bbb test

Run debug version of server

$ ./node_modules/bbb/bin/bbb debug
$ ./node_modules/bbb/bin/bbb server:debug

Run release version of server

$ ./node_modules/bbb/bin/bbb release
$ ./node_modules/bbb/bin/bbb server:release
  1. The coffee grunt task(tasks/coffee.js) is copied from https://github.com/avalade/grunt-coffee, and I only add a strip option to support compile coffee files to js files recursively.
  2. The staticserver grunt task(tasks/staticserver.js) is copied from grunt server task. jasmine task needs a static web server to serve its tests. We define a test task like grunt.registerTask('test', 'default staticserver jasmine');, here I don't use bbb's server task because the server task will not end, so the jasmine task will not be run.