Giter VIP home page Giter VIP logo

hashspace's Introduction

Build Status devDependency Status devDependency Status Coverage Status Selenium Test Status

hashspace

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:

  • a file pre-processor that translates the HTML templates into JavaScript functions (cf. compiler test files for the syntax)
  • a runtime library that interprets the compiled templates dynamically

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:

  • run grunt to launch a local web-server that can compile templates on the fly (cf. hsp/grunt folder)
  • open http://localhost:8000 in your favorite browser and choose an example from the sample list
  • or open http://localhost:8000/todomvc to play with the todomvc sample..

Development

Preparing your environment

  • install Grunt cli globally: npm install -g grunt-cli
  • install local npm modules: npm install

Running Tests

For jshint validation:

  • run grunt checkStyle

To run all the tests (compiler and runtime):

  • grunt test

For the compiler test only:

  • run grunt mocha (you can also work in the TDD mode by running grunt watch:mocha)

For the browser-based runtime tests only:

  • run grunt karma:unit to test on local browsers and generate a coverage report
  • run grunt karma:tdd to work in the TDD mode
  • run grunt karma:coverage to test on PhantomJS browser and generate a coverage report
  • run grunt karma:sauce to 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:

  • run grunt tddrt - this will launch a local webserver and a watch task on your files
  • and access http://localhost:8000/test/rt to run the tests in your favorite browsers

Working on the playground

To work on the playground the most simple option is to open 2 terminal windows:

  • one running grunt docs:playground to build the playground and launch the webserver
  • another one running grunt 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 terminal

Then you can use http://localhost:8000?dev=true in your favorite browser to get the development version of hashspace

hashspace's People

Contributors

b-laporte avatar divdavem avatar fbasso avatar jakub-g avatar marclaval avatar piuccio avatar pk1a avatar ymeine avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.