Example: http://kurst.co.uk/samples/svg/
This is a simple API for creating SVG graphics using TypeScript ( or JavaScript ) .
Code example:
this.svg = new SVGCanvas( htmlElement ); // Create an SVG element
this.svg.width = 800;
this.svg.height = 600;
this.rect = new SVGRectangle();// Create & add Rectangle
this.rect.width = 200;
this.rect.height = 200;
this.rect.x = 10;
this.rect.y = 10;
this.arcPath.fill( '#00ff00' );
this.svg.append( this.rect );
-
install nodejs ( http://nodejs.org/ )
-
install grunt cli
sudo npm install -g grunt-cli
-
install the dependencies used by the build script:
sudo npm install
this will also install front end JavaScript dependencies using Bower. However you might still need to run the following:
bower install
-
to compile the project, run:
grunt
-
to run the grunt watch, this will compile changes as you save:
grunt watch
-
to export a release build run:
grunt release