jakubfiala / atrament

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

unexpected token '(' #10

Closed loucapo closed 8 years ago

loucapo commented 8 years ago

i'm not sure where to look so I thought I would post it here. I am using atrament in my app and it works fine in chrome and firefox but in safari its giving me a strange error:

unexpected token '('

at this line:

set(x, y) {

in Point

any ideas?

jakubfiala commented 8 years ago

Hi, it seems like you're using the ES6 source script located at src/atrament.js. This won't run in Safari yet because it doesn't support ES6 syntax.

It's best to use the dist/atrament.min.js file, as that's transpiled and minified.

loucapo commented 8 years ago

I had a feeling it was the ES6 thing. But then I saw it worked for your demo page and that confused me. I guess I incorrectly assumed dist and src were the same version; just dist was minified. Either way, its working now so thanks!