jakubfiala / atrament

A small JS library for beautiful drawing and handwriting on the HTML Canvas.
http://fiala.space/atrament/demo
MIT License
1.56k stars 115 forks source link

Create Atrament Module #7

Closed reccanti closed 8 years ago

reccanti commented 8 years ago

I created an Atrament module. Users can import the atrament() function using var atrament = require('atrament');. Alternatively, they can use the Atrament class using var Atrament = require('atrament').Atrament;

I also created a webpack config file. This just runs through the JavaScript files in src, transforms them with babel, and puts them in a bundled umd module with sourcemaps in the dist/ folder. There's also an npm prepublish script, which just runs babel on the files and puts them in the lib/ folder. That way if the user installs it as an npm dependency, they can bundle it as part of their build process.

jakubfiala commented 8 years ago

hey @reccanti thanks a lot! any chance you could merge the current master into this PR? We had another PR adding a fill mode, that's why there are conflicts.

Great work though, very appreciated!

reccanti commented 8 years ago

Sorry it took so long to get back to you. I fixed the issues. It looks like the conflict was coming from the generated atrament.min.js.

jakubfiala commented 8 years ago

awesome, thank you! Just gonna go through the code and should be able to merge in a few hours.

jakubfiala commented 8 years ago

hey @reccanti sorry to bother you again, I checked the PR and it's great! Could you also put node_modules in gitignore though, and re-commit?

jakubfiala commented 8 years ago

sorry, stupid me, didn't realise it's already there. Merging now.