Hashspace is a client-side HTML template engine. Its purpose is to provide a powerful and light-weight way to create adanced web-pages containing application logic. Please visit http://hashspace.ariatemplates.com/ for more information.
Hashspace is composed of 2 main parts:
Please refer to the samples in the unit-tests suites in the test/compiler
or test/rt
folders for more details.
The docs/todomvc
folder also contains an implementation of the todomvc application (still to be completed to match the full specifications).
To run and update the samples in a live environment, first run npm install
and then:
grunt
to launch a local web-server that can compile templates on the fly (cf. hsp/grunt
folder)http://localhost:8000
in your favorite browser and choose an example from the sample listhttp://localhost:8000/todomvc
to play with the todomvc sample..npm install -g grunt-cli
npm install
For jshint validation:
grunt checkStyle
To run all the tests (compiler and runtime):
grunt test
For the compiler test only:
grunt mocha
(you can also work in the TDD mode by running grunt watch:mocha
)For the browser-based runtime tests only:
grunt karma:unit
to test on local browsers and generate a coverage reportgrunt karma:tdd
to work in the TDD modegrunt karma:coverage
to test on PhantomJS browser and generate a coverage reportgrunt karma:sauce
to test on SauceLabs browsersTo do the health check on the project (before commit, for example) run grunt test
. This will run checkstyle verifications
and all the tests (compiler and runtime).
For the browser runtime tests:
grunt tddrt
- this will launch a local webserver and a watch task on your fileshttp://localhost:8000/test/rt
to run the tests in your favorite browsersTo work on the playground the most simple option is to open 2 terminal windows:
grunt docs:playground
to build the playground and launch the webservergrunt docs:watch
to watch the file changes and copy the changed files to the hashspace-gh-pages folder that is referenced by the webserver launched in the first terminalThen you can use http://localhost:8000?dev=true
in your favorite browser to get the development version of hashspace