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
Create @nebula.gl/layers #189
Conversation
export { ArrowStyles, DEFAULT_ARROWS, MAX_ARROWS } from './style.js'; | ||
|
||
// Layers | ||
export { default as EditableGeoJsonLayer } from './layers/editable-geojson-layer.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, will both of these work after this PR?
const EditableGeoJsonLayer = require('nebula.gl')
const EditableGeoJsonLayer = require('@nebula.gl/layers')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is the idea 👍
Similar to deck.gl
and @deck.gl/core
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be precise you will need to:
const { EditableGeoJsonLayer } = require('nebula.gl');
const { EditableGeoJsonLayer } = require('@nebula.gl/layers');
or
import { EditableGeoJsonLayer } from 'nebula.gl';
import { EditableGeoJsonLayer } from '@nebula.gl/layers';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, it aligns very nicely with the module strategy in other vis.gl repos!
One thing missing here that I think is quite important is to document the module structure. Explain to users (and developers) what modules are available, what they contain etc, including clearly calling out that the nebula.gl
module is a deprecated module included for backwards compatibility.
The docs should likely also be lightly reorganized to reflect a per-module structure.
On a separate note, I would suggest not using the directory name core
for the deprecated module.
The reason is that most of our vis.gl monorepos have a (non-react) core module (@luma.gl/core
, @deck.gl/core
, loaders.gl/core
). If you ever need a set of common classes you would put them there. Even if not, just for the sake of alignment it is better to not confuse devs that move between repos by using core for different things.
FWIW, we put our deprecated unscoped modules (luma.gl/deck.gl/loaders.gl) in the modules/main
directory in each repo...
Finally, a nit: I see lots of commented code left in the example, recommend cleaning up asap.
No description provided.