選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
dotnetCarpenter 85cc7cc130
testing saucelabs
5年前
.config testing saucelabs 5年前
bench fix a few mistakes. Make sugar work. Roll back to childNodes because children is 10x slower 5年前
dist testing saucelabs 5年前
playgrounds Allowed the origin to stay fixed as we animate transforms 6年前
spec `fill()` and `stroke()` return the fill and stroke attribute when called as getter (#789) 5年前
src add registering for forgotten classes 5年前
.eslintrc Linted all files, upgraded all dependencies 5年前
.gitignore reordered modules, add es6 build 5年前
.travis.yml fix travis yml 5年前
CHANGELOG.md added possibility to pass in additional attribues to element creators (#796) 5年前
LICENSE.txt Updated LICENSE 7年前
README.md fix readme 5年前
bower.json Updated docs 7年前
dirty.html rework of classes, make events on every object possible 5年前
package-lock.json cleanup and use chromium on linux 5年前
package.json cleanup and use chromium on linux 5年前
rollup.config.js remove other builds because of bloat for now until fixed 5年前
svg.js.d.ts Syntax fixes in TypeScript declaration file 7年前
todo.md `fill()` and `stroke()` return the fill and stroke attribute when called as getter (#789) 5年前
useCases.md The runners step was reimplemented with tests 6年前

README.md

SVG.js

Build Status Coverage Status CDNJS

A lightweight library for manipulating and animating SVG, without any dependencies.

SVG.js is licensed under the terms of the MIT License.

Installation

Bower:

bower install svg.js

Node:

npm install svg.js

Cdnjs:

https://cdnjs.com/libraries/svg.js

Documentation

Check https://svgdotjs.github.io to learn more.

Donate

Development

To develop svg.js, you have a few commands available to you. Firstly, you should clone this repo, then cd into the folder with this README and run:

npm install

You’ll now have all the dev dependencies installed, and you’ll be ready to build the bundle. Once you’ve made your changes just run:

npm run build

This will build svg.js and make a distribution in the /dist folder. While developing, this may not be so convenient as the build will fail if you have any linting errors, refer to the standard coding styleguide for style we use, linters are available for most popular text editors as well.

However, because we were too nice to put you through the pain of always having to work with a linter, we added a gentle mode that you can use by running:

npm run build:dev

This will only warn you about linting errors and give you useful feedback about possible errors you may have in your code (but this is no substitute for tests). Please make sure that before making any pull requests, you pass all of our tests and can build with npm run build first.

Testing

This will set up everything. While you are working, you should make sure your changes pass all of our tests, so just run:

npm run test

Or just launch the jasmine test runner from /spec/SpecRunner.html. Its good to try the spec runner on a few different browsers.

Performance

You can run performance tests by making a new benchmarks, look in the /bench folder and just add a new js file with the test you want to make. We include a few examples in the repo to make it easy for you to make your own.

Playgrounds

If you would like a simple sandbox that you can use

Pull Requests

We welcome any pull requests and will try our hardest to review them as soon as possible. If you need any help or would like to chat, check out our gitter group, we are always happy to see new users!