chore: set up blockly to be a monorepo #9575
Open
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.
The basics
(as best I could)
The details
Resolves
Fixes #7759
Fixes #7757
Addresses #7768
Proposed Changes
packages/blocklypackages/blocklyif needed (not needed if new top-level scripts have been added)tag_module_cleanupaction since it's no longer needed.Reason for Changes
Making blockly + blockly plugins into a monorepo has a lot of benefits that are already documented elsewhere.
The reason I'm doing this right now is that I'm trying to launch the new documentation site. The way the new docs were set up by cybage effectively had a standalone npm project nested inside the blockly project, which just isn't maintainable going forward. Having a monorepo is the correct way to have multiple projects in the same repository.
In another PR coming soon, I'll have the docs added under
packages/docsand then we'll be able to manage both packages through the monorepo tooling provided by npm workspaces.Test Coverage
Documentation
The contributing docs will need to be updated to explain how to use the monorepo. For now, you can just
cd packages/blocklyand just keep doing what you were doing. Nothing has changed except your working directory.Additional Information
Review this PR commit-wise. One of the commit renames all of the files. The other two commits do the more interesting stuff.
Future work
Ideally linting and formatting would be done at the root level instead of their configs being inside the
packages/blocklydirectories. However, since there are no other packages right now, that is not a pressing need and doing it this way keeps as much the same as possible. Those files should be moved back to the root level as part of #7760 and #7761