Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build to ES5 #8

Open
nattelog opened this issue Aug 4, 2016 · 6 comments
Open

Build to ES5 #8

nattelog opened this issue Aug 4, 2016 · 6 comments

Comments

@nattelog
Copy link

nattelog commented Aug 4, 2016

The current npm package isn't built to ES5, only ES6. Is there a reason for it? Or is it possible to compile the code before publishing it?

@Philmod
Copy link
Owner

Philmod commented Aug 4, 2016

Hey Natanael,

Could you tell me more about the reason you need the ES5 version? In which environment are you using this package?

@nattelog
Copy link
Author

nattelog commented Aug 5, 2016

Hi,

In my device model I use velocity model which use your PID controller. I use the device model on a website so the ES6 pid controller code runs there. It works on Chrome but not on Safari. I could build it myself but I thought it would be better if it was already built when I require it.

@Philmod
Copy link
Owner

Philmod commented Aug 5, 2016

If you use browserify, you should be able to compile it in the format you need. Would that help?

@nattelog
Copy link
Author

nattelog commented Aug 9, 2016

Well, my project use webpack. Perhaps it has a solution for it. Thanks for the help anyway! 😄

@Philmod
Copy link
Owner

Philmod commented Aug 9, 2016

You have to use a compiler like Babel, that will work with webpack.

@rreusser
Copy link

rreusser commented Aug 18, 2016

I've submitted a PR (#9) to accomplish this without duplicating files, either in the source or in the npm module. It's opinionated so you're 100% free to just disregard! For me though, I was just making a medium-sized browser-targeted demo that didn't really benefit at all from ES6, so it was just a bit unpleasant to babelify the whole project for one dependency (requires working browserify into the dev server and build step, which isn't that bad, but a slight pain). Either way though, thanks for the great module!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants