iTowns / itowns

A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data
http://www.itowns-project.org
Other
1.09k stars 293 forks source link

[Packaging] export addons (widgets and debug tools) #2197

Open mgermerie opened 11 months ago

mgermerie commented 11 months ago

Context

Currently, widgets are exported within itowns bundle - in itowns/widgets. GuiTools are available as a single js file download within examples/js/GUI folder. Debug tools are not published and not suitable for use within an external project, as discussed in #2061. There are also a few addons - some of which could get an update - available as a js file download in examples/js/plugins folder.

The packaging of these addons could be harmonized, making them available and simple to use in an external project. Meanwhile, the following addons would need to be rewritten/updated :

There is also the question of GitHub repository. We can either extract those addons to a separate repository in iTowns organization or keep them in iTowns/itowns repo. On this matter, three.js opted for the single repository option. It has the advantage of a simpler setup and maintenance.

These subjects are open to discussion.

Suggested solutions for packaging

Provided we opt for the single GitHub repository option, we could do as three.js addons :

If we choose the separate GitHub repository approach, I don't know if we could still publish addons as an itowns sub-package, but we could still publish them as a package of @itowns npm organization.

valentinMachado commented 11 months ago

I rather the single Github repository option for the reasons you said. Theses packages/addons are going to be related each other it would be easier to maintain them if all modifications for a feature can be wrapped into one PR. CI can be done on all addons/packages.

I rather also the npm packages approach (in @itowns npm organization):

jailln commented 11 months ago

agree with you both and same opinion than @valentinMachado on the implementation for all the reasons you've both given