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

Requires Babelify with Browserify #9

Closed
danhere opened this issue Nov 5, 2016 · 2 comments
Closed

Requires Babelify with Browserify #9

danhere opened this issue Nov 5, 2016 · 2 comments

Comments

@danhere
Copy link

danhere commented Nov 5, 2016

Installed OpenShare with npm and added var OpenShare = require('openshare'); to my script.

Upon compilation, it throws an error that it requires babelify but that isn't installed as a dependency. Is Babelify required to use OpenShare?

@jakeburden
Copy link
Member

Howdy @danhere 👋 Our goal since (1.0.0) was that those who weren't using babelify could still use openshare by doing require('openshare/dist/openshare'). We should probably make this more clear in the readme.

There is an example of using babelify with browserify in our package.json. We use the npm scripts highlighted there for testing.

However, as mentioned in #3 and #8 we're looking for better ways to publish this module so that babelify isn't really required. If you're running into issues with npm installs you can use this CDN: <script src='https://cdn.rawgit.com/OpenShare/openshare/master/dist/openshare.js'></script>

If you're not using the CDN and the recent ES2015ify'd version of openshare isn't building due to it's ES2015yness, you can install the pre-ES2015 version by doing npm i [email protected] -S or npm i github://OpenShare/openshare#23ee2b80e4af31076e5ff526e51b1d7f5ee503f3 -S

@danhere
Copy link
Author

danhere commented Nov 5, 2016

Awesome. I'll give that a shot. Thanks!

@danhere danhere closed this as completed Nov 5, 2016
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

2 participants