Conversation
Expose each module in dist/layers as @geoarrow/deck.gl-geoarrow/layers/<name> so consumers can import only the layers they use, without their bundler having to resolve @deck.gl/geo-layers or @deck.gl/aggregation-layers. The root entry point is unchanged. The experimental text layer stays reachable only as _GeoArrowTextLayer from the root. Closes geoarrow#221
Member
|
I commented on this in #221 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #221
Summary
Adds a
./layers/*subpath export so each layer module can be imported on its own:Importing through the package root makes the bundler resolve every layer module before tree-shaking. That includes the ones that import @deck.gl/geo-layers (A5, Geohash, H3 hexagon, S2, trips) and @deck.gl/aggregation-layers (heatmap). With subpaths, an app that only uses, say, the path, polygon, and scatterplot layers never has to resolve those packages.
Changes
./layers/*pointing atdist/layers/*.js/*.d.ts. The root "." export is unchanged../layers/text-layer: nullkeeps the experimental text layer out of the subpaths, so it is still only reachable as_GeoArrowTextLayerfrom the root.Note that a subpath exposes everything its module exports, e.g.
defaultPropsfrompath-layerandgetPolygonExterior/getMultiPolygonExteriorfrompolygon-layer. Happy to switch to an explicit list of layer entries, or adjust those module exports, if you'd prefer to keep them out of the public surface.Testing