Go to file
Dmitry Baranovskiy 8c67c8ceaa Merge branch 'dev' 2017-02-06 12:14:53 +11:00
demos Fix spelling on pie 2016-05-20 09:10:45 +01:00
dist Fix for fill attribute getter 2017-02-06 12:05:34 +11:00
doc Fix for fill attribute getter 2017-02-06 12:05:34 +11:00
src Fix for fill attribute getter 2017-02-06 12:05:34 +11:00
test Fix for fill attribute getter 2017-02-06 12:05:34 +11:00
.gitignore Fixed issue with parse in IE 2014-08-05 09:52:27 +10:00
.gitmodules Moving submodules (part 1) 2013-08-16 11:15:34 +10:00
.travis.yml Travis integration with Slack 2017-02-03 16:46:23 +11:00
CONTRIBUTING Pre 0.5.0 clean up 2017-02-03 22:19:22 +11:00
Gruntfile.js Pre 0.5.0 clean up 2017-02-03 22:19:22 +11:00
LICENSE Add License 2013-08-15 18:31:27 +10:00
NOTICE Fix for bug #25 & #110 2013-11-18 23:02:11 +11:00
README.md Pre 0.5.0 clean up 2017-02-03 22:19:22 +11:00
bower.json Fix for fill attribute getter 2017-02-06 12:05:34 +11:00
component.json Fix for fill attribute getter 2017-02-06 12:05:34 +11:00
dr.json Docs fix 2017-02-05 12:17:21 +11:00
history.md Fix for fill attribute getter 2017-02-06 12:05:34 +11:00
package.json Fix for fill attribute getter 2017-02-06 12:05:34 +11:00
template.dot Docs fix 2017-02-05 12:17:21 +11:00

README.md

Snap.svg · Build Status CDNJS GitHub Tag License

A JavaScript SVG library for the modern web. Learn more at snapsvg.io.

Follow us on Twitter.

Install

Learn

Use

In your HTML file, load simply by:

<script src="snap.svg-min.js"></script>

No other scripts are needed. Both the minified and uncompressed (for development) versions are in the /dist folder.

To load with webpack use following command:

const Snap = require(`imports-loader?this=>window,fix=>module.exports=0!snapsvg/dist/snap.svg.js`);

Build

Build Status

Snap.svg uses Grunt to build.

  • Open the terminal from the Snap.svg directory:
cd Snap.svg
  • Install its command line interface (CLI) globally:
npm install -g grunt-cli

*You might need to use sudo npm, depending on your configuration.

  • Install dependencies with npm:
npm install

*Snap.svg uses Grunt 0.4.0. You might want to read more on their website if you havent upgraded since a lot has changed.

  • To build the files run
grunt
  • The results will be built into the dist folder.
  • Alternatively type grunt watch to have the build run automatically when you make changes to source files.

Testing

Tests are located in test folder. To run tests, simply open test.html in there. Automatic tests use PhantomJS to scrap this file, so you can use it as a reference.

Alternatively, install PhantomJS and run command

grunt test

Contribute

git checkout -b my_branch
  • Add your changes.
  • Check that tests are passing
  • Commit your changes:
git commit -am "Added some awesome stuff"
  • Push your branch:
git push origin my_branch

Note: Pull requests to other branches than dev or without filled CLA wouldnt be accepted.