diff options
author | wout <wout@impinc.co.uk> | 2012-12-23 14:13:05 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2012-12-23 14:13:05 +0100 |
commit | 64a1a7488adba419aa6b65e12c7a25cd602cadb0 (patch) | |
tree | 951d3bcc948915c07c50a76db5cd9bdbfa522926 /README.md | |
parent | 6e2d46d1369426986defbecbbb5febeec1b25e90 (diff) | |
download | svg.js-64a1a7488adba419aa6b65e12c7a25cd602cadb0.tar.gz svg.js-64a1a7488adba419aa6b65e12c7a25cd602cadb0.zip |
Added build instructions to README
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -364,6 +364,45 @@ SVG.extend(SVG.Doc, { ``` +## Building +Starting out with the default distribution of svg.js is good. Although you might want to remove some modules to keep the size at minimum. + +You will need ruby, RubyGems, and rake installed on your system. + +``` sh +# dependencies: +$ ruby -v +$ gem -v +$ rake -V + +# required to generate the minified version: +$ gem install uglifier +``` + +Build Zepto by running `rake`: + +``` sh +$ rake +Original version: 17.010k +Minified: 9.083k +Minified and gzipped: 2.760k, compression factor 6.163 +``` + +The resulting files are: + +1. `dist/svg.js` +2. `dist/svg.min.js` + +To include optional modules and remove default ones, use the `concat` task. In +this example, 'clip' is removed, but 'group' and 'arrange' are added: + +``` +$ rake concat[-clip:group:arrange] dist +``` + +_The Rakefile has been borrowed from [madrobby's](https://github.com/madrobby) [Zepto](https://github.com/madrobby/zepto)_ + + ## To-do - Animation module (element animation, path tweens and easing) - Draggable module (make elements and groups draggable) |