Open GuillaumeAmat opened 6 years ago
This is a great idea, and I'd like to do this too whenever we make an iD v3. Hope you understand that it's a low priority right now, below shipping features that matter to our users.
@kepta had started some work on this, but it's a hard problem. Many of the components of iD depend on each other, so although we have the code organized into modules, they aren't really separate.
In the meantime, you can require iD in another project as a dependency and use the pieces of it that we export. A bundler like Rollup.js should be able to include only the parts of iD that you are using.
A really simple and silly example of this is id-area-keys, which depends on all of iD just to import a single .json file and process it.
I managed to extract the id-presets
part, you can find the repository here. Please note it is experimental, but all the test cases from the main iD work.
@bhousel I totally understand the low priority. In the meantime, we have started a new project for our needs and will use your advice thank you ;)
@bhousel I totally understand the low priority. In the meantime, we have started a new project for our needs and will use your advice thank you ;)
Sure- by the way do you want to move your projects into the osmlab organization? It might be more visible that way, and I'm happy to grant you access to do that.
Great! Would you accept to add the 2 other repositories of the organization too? I'm talking about osmose-request et leaflet-nectarivore (wip).
What's the policy of osmlab?
https://gist.github.com/tmcw/5157262 is the osmlab policy.
Basically, it's like SVN used to be - no real ownership, but you probably want to talk to others active in a repo before merging stuff. If you have a project with a strong notion of maintainers, it's not the right place, but if you're releasing something out there to the development community, it's a reasonable option.
'kay thank you @pnorman. It seems that it fits with our needs. Can you add me to the organization?
cc @bhousel @kepta
ok @GuillaumeAmat you should have an invite waiting for you 👍
Got it! Thanks ;)
Part of #6483.
Hi there!
As web developers committed into the osm world for several years, my friends and I would like to discuss about the architecture of the iD repository.
Our first concern is the reusability of the code. You all did an amazing work on that tool but it is self-contained and unusable in other projects.
Eg: the osm module, the data sources, etc.
Can you consider to split the main repo into several targeted repos to able us to use it as dependencies in our projects and in iD?
That way we could all contribute to the same data and code rather than duplicate efforts...
Can't wait to read you ;)