g.js is a JavaScript library for working with graphical objects. It provides a unified API for working with vector graphics (rectangles, paths, and text) and images.
Download the latest ZIP and grab the files in the dist
folder.
These are compiled.
To install using Bower, enter the following command in your project directory:
bower install g.js
You can then include them in your scripts using:
<script src="https://github.com/nodebox/g.js/raw/master/bower_components/g.js/dist/g.js"></script>
To install using Browserify, enter the following command in your project directory:
npm install --save g.js
We use a set of npm scripts to build releases:
Running npm run watchify
will automatically create new builds in the build
directory whenever the source changes.
Running npm run dist
will build a complete and minified version of g.js in the dist
folder. You can also run
npm run browserify
and npm run uglify
separately.
package.json
.npm run dist
to update the files in the dist
folder.git commit -a
) and create a tag (e.g. git tag 1.2.1
). Push and push tags (git push && git push --tags
).npm publish
to publish the package to npm.