Bug 1686678 - Reorganize code in core/ and platform/ submodules #72
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.
This is more or less related to Bug 1686678. I did a bit of reserach on that bug to figure out the best way to organize the Glean.js package. In this research I saw other packages that organize their code like I do in this PR and I liked the approach.
I think this way the platform specific and non platform specific code is more clearly separated. As a bonus it is clearer to separate tests that run on the browser and tests that don't.
I also moved all the code into a glean/ folder. That is necessary in order to be able to use
npm linkto link and use the future@mozilla/gleanpackage in our samples. Turns out we can't use that command if the sample is inside the package folder. To bypass that I move the package into a dedicated folder.