-
Notifications
You must be signed in to change notification settings - Fork 133
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
Packaging and module loading questions #117
Comments
I've really just been optimizing for my own use cases until others are requested. I've been targeting AMD usage but am open to exporting CommonJS as well. We should look into customizing the Brocfile to enable CommonJS output from the transpiler. Also, I'd be willing to publish builds to npm in addition to bower. |
Alright, cool. I ended up getting it working with Webpack, Bower and AMD, but need to wait for JSONAPI RC3 or 1.0 support before I go any further. Glad to know you're open to NPM and CommonJS, though! Thanks! |
Sure - glad you worked something out in the meantime. Also, we're tracking JSON API compliance in #113 - it's very high on the priority list. |
@dgeb it would be awesome if the builds were also pushed to npm thanks. I was trying to integrate orbit and react native and this seems to be the only way to do it. |
@dgeb Another vote here for publishing to NPM. Any guess as to when this might happen? |
@john-griffin @amutz Can you tell me more about your use cases? Are you looking for CommonJS builds as well? Are you using webpack? If you know of any, please point me to any well done examples of libs published to both bower and npm and transpiled for AMD, CommonJS, and globals. |
@dgeb I was attempting to integrate a React Native app with a JSON API data source. Orbit could be a good fit for that because it can be used with any framework, is JSON API compatible and allows for defining a custom data source (e.g. I could implement the equivalent of React Native apps are complied in Node so use CommonJS. I'm sorry but I'm not familiar with other projects that publish to both bower and npm. |
@john-griffin thanks for the details. I'd definitely like to support this use case and will look into transpiling for CommonJS and simultaneous publishing to bower and npm. |
I'd like npm if only to not need bower for anything :) |
@wyattanderson , hey. Could you let us know how you got Orbit working with Webpack? Thanks |
Sorry, I don't have the code around anymore. We ended up going a different direction. I needed to do a lot of things mentioned on the shimming modules page to make it work. |
+1 for Webpack and NPM |
Orbit is now published to npm as Please let me know if you have any problems with the builds. |
Related to this issue: I am using a React project that imports another one of my modules (an "sdk' that uses OrbitJS). On a basic test, I am getting compilation errors (using Webpack) such as the following:
What is the standard practice for using the es5 version of each Orbit module? This is the pr that motivated me to post my question here: facebook/create-react-app#2650 |
Hey, I have a couple quick questions about packaging and module loading of Orbit.js:
require
orbit-common
andorbit-common-jsonapi
,Orbit
andOC
are actually leaked to thewindow
object. Is this intentional? Is there a way to build Orbit to avoid this? Are ES6 modules preferred?I'm trying to set up a new project with Orbit in a CommonJS/webpack stack and these two things are making it tough.
The text was updated successfully, but these errors were encountered: