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

Update the SDK to export an actual ES2015 module #123

Open
jwngr opened this issue Sep 28, 2016 · 5 comments
Open

Update the SDK to export an actual ES2015 module #123

jwngr opened this issue Sep 28, 2016 · 5 comments

Comments

@jwngr
Copy link

jwngr commented Sep 28, 2016

PRs welcome!

Currently the library is exported in such a way that you can only use require('geofire') within Node.js. This means you cannot get require('geofire') or import * as GeoFire from 'geofire' to work with ES2015-compatible browsers or browser bundlers like webpack and Browserify. We should export an actual ES2015 module to support those modern use-cases.

@RedFour
Copy link

RedFour commented Sep 29, 2016

I'm been looking for how to integrate GeoFire to my Angular 2 project. My project is created using the angular-cli which uses webpack. Does this issue mean I can't import GeoFire right now?

@jwngr
Copy link
Author

jwngr commented Sep 29, 2016

You can include it the "old-fashioned" way. That is, just include a <script> tag for the GeoFire library in your main HTML file and use the global GeoFire object that it creates.

@zelkin
Copy link

zelkin commented Jan 24, 2017

You have no other way to integrate GeoFire with webpack ? Include a js file in html, with a beautiful angular2 apps, so bad... :(

@jwngr
Copy link
Author

jwngr commented Jan 24, 2017

<script> tags work wonderfully even in modern app development. I'll gladly review a PR which fixes this issue if you care a lot about it being fixed.

@MichaelSolati
Copy link
Contributor

@firebase-ops I'm not sure if this is still an active endeavor, but I banged out this...

https://github.com/MichaelSolati/geofire-js/tree/typescript

I believe the next steps would be to implement the tests you guys have written already as well as some build tweaks (and a uglify/bundle). Regardless, I would love help on these next steps if anyone is interested.

I'd say it's probably 75% done IMHO.

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

No branches or pull requests

4 participants