harness depends on node.js and is really just a set of scripts that run CLI commands.
The most common use case is a project that involves a Rails app and a Backbone.js app.
Traditionally, both apps would be kept in the same codebase out of convenience but at the expense of portability and boundary.
harness you can give the apps separate codebases and still have the same test and front end preprocessing tools you'd expect with a Rails stack.
Write an app with
harness and deploy it to any host web app or even S3.
Think in terms of a host and guest app situation.
harness builds guest apps to be embedded on pages in Rails host apps.
- Compiled on save
Browser auto-refresh with
- Page is refreshed in any browser currently opened to
localhost:8080every time a source file changes
- Unit tests are auto-run in any browser currently opened to
localhost:7357every time a source or test file changes
Headless integration tests in Webkit with
- Run integration tests regularly to assert common use cases and user flows
- Inline comments with markdown are parsed and displayed as HTML documentation
Dependency management with
- Modularize, prevent global leakage, and control module dependencies
Endpoint mocks with
- Mock out server endpoints with sample responses that mimic production
Deployment to filesystem
make deployaccepts an
cpthe output assets to another codebase on the filesystem
- Embeddable for any app in any country on any platform. Just define some configuration and endpoints.
Runtime dependency independent
- Use any dependencies you want -- backbone.js, ember.js or fuckit.js
Clear and defined integration points
- Forces upfront thought to define the boundaries and interfaces for client-side code
Less global impact
- Reduce the reliance on super objects
Fast and transparent tests
- Run automatically on every file change so test setup is painless
- Early detection of regressions
- gcc: install via Xcode
- node.js 0.8.8+
sudo easy_install pygments
brew install casperjs
Before this is legitimized as a CLI tool, feel free to copy the
harness/ dir into your own repo and run
harness generate to generate an example config and app directory structure.
harness dev starts file watchers for
app/test and a server at
http://localhost:8080 for development.
harness test to run tests every time a source or test file is changed.
harness deploy to make a build and
cp public/prefix* to the configured output directory in