hashspace compiler and runtime
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/rt folders for more details.
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:
gruntto launch a local web-server that can compile templates on the fly (cf.
http://localhost:8000in your favorite browser and choose an example from the sample list
http://localhost:8000/todomvcto play with the todomvc sample..
npm install -g grunt-cli
For jshint validation:
To run all the tests (compiler and runtime):
For the compiler test only:
grunt mocha(you can also work in the TDD mode by running
For the browser-based runtime tests only:
grunt karma:unitto test on local browsers and generate a coverage report
grunt karma:tddto work in the TDD mode
grunt karma:coverageto test on PhantomJS browser and generate a coverage report
grunt karma:sauceto test on SauceLabs browsers
To 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 files
http://localhost:8000/test/rtto run the tests in your favorite browsers
To work on the playground the most simple option is to open 2 terminal windows:
grunt docs:playgroundto build the playground and launch the webserver
grunt docs:watchto 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 terminal
Then you can use
http://localhost:8000?dev=true in your favorite browser to get the development version of hashspace