derhuerst / svg-patterns

SVG patterns for Data Visualization.
https://derhuerst.github.io/svg-patterns/
ISC License
219 stars 7 forks source link

Compile published package to ES5 #3

Closed dallonf closed 7 years ago

dallonf commented 7 years ago

Many tools (in particular, UglifyJS, which is used by the Create React App toolset) do not support ES6 syntax like arrow functions. See https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify

derhuerst commented 7 years ago

While UglifyJS supports ES6, I recognise the need for libs to be published in a transpiled form. I don't see this as a long-term solution to the problem, but I am willing to make my library more easy-to-use.

Please submit a PR if you want this soon. Otherwise I will deal with it later.

derhuerst commented 7 years ago

This could be done like in one of my other repos (except the test script of course):

https://github.com/derhuerst/browser-location/blob/e0e59875711cb4efcb2c9dbebed651f90218ba8f/package.json#L15-L29

derhuerst commented 7 years ago

Should be fixed as of ba75a2b. Published as svg-patterns@0.1.3.

dallonf commented 7 years ago

Thank you!