-
Notifications
You must be signed in to change notification settings - Fork 16
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
Let's talk about dependencies... #12
Comments
I'm not sure that supporting inclusion via That means that #10 is all we really need to aim for. Going the npm route means also that we don't have to worry about the upstream deps confusion you mention -- npm will handle this if we get our build right. |
Re: |
@mojodna have you seen @sconnelley's work here? I think he's moving toward what I describe above / what you are talking about in #10. @sconnelley correct me if I'm wrong / missed anything. |
If this is the case, we only need a
If we're going pure Does I'm against using
Agreed. |
Coming back into this after a hiatus. IIRC, we use Would there be any problems with a AFAICT, the goal is to have all the |
Here's one reason I'm beginning to wonder if we want a solution like what lodash does, with all modules contained within a single repo but built out into a series of separate, discrete npm packages. I don't know how to do that tho, especially with our need for per-module stylesheets. |
And in fact...if the downstream project doesn't manually install those peer deps, it won't run, because This really makes me think we need to figure out how to have separate builds per module. |
Agreed on package per module.
|
If it doesn't run without them, aren't they true dependencies? ;-)
|
I misspoke -- it won't build without them. |
Here's another style: https://github.com/mattdesl/eases I'm not sure yet if this would work for us, needs some thought. But the idea is that the library is not compressed or transpiled (the latter, we can discuss), but is brought in as raw source. And each component has a single entry point, a js/x file, and you just import that file (and it imports whatever other local files are necessary). Still don't see how this will help with dependencies at the npm level (would still have to specify everything used by each component in Another, somewhat-related thought: maybe we need to offload some of the complexity to the downstream project, in terms of determining which dependencies from the toolkit to package into its build? A bit less portable but we can shepherd the process, esp. on internal Richmond/Stamen projects. Might be simpler. |
Oh yeah and that ^^ is somewhat similar to |
Looks like this is all worked out now in our fork. Closing. |
peerDependencies
don't make sense because npm 3 doesn't install them, introducing an extra step before being able to work on this module. Conceptually, they're right for the non-bundled,webpack
-ed build.dependencies
seems like the most appropriate way of defining them (they install when developing on this and are included for npm-style resolution), but it adds to the footprint when only the bundled assets are used.devDependencies
would install necessary runtime libraries and facilitate bundling (and keep the footprint small), but it would preclude npm-style module resolution (because nested modules would be unavailable).#10's approach (facilitating npm-style resolution, which we're not currently doing) seems like the most appropriate mechanism for our use-cases, but we're also trying to hit these:
<script>
, with external (to avoid potential duplication) references to compatible dependencies (e.g. Leaflet, d3, ...)<script>
tag (including all dependencies).We're currently using (1), but incorporating it into a separate build system and potentially introducing confusion around how to incorporate upstream dependencies (e.g. react-leaflet).
Thoughts?
The text was updated successfully, but these errors were encountered: