feat: support npm workspaces for local development#185
Open
arbrandes wants to merge 3 commits intoopenedx:mainfrom
Open
feat: support npm workspaces for local development#185arbrandes wants to merge 3 commits intoopenedx:mainfrom
arbrandes wants to merge 3 commits intoopenedx:mainfrom
Conversation
7af2983 to
7fd4dc4
Compare
arbrandes
commented
Mar 12, 2026
99b6a94 to
b13dabc
Compare
6e0f0fe to
dc52c84
Compare
Decouple clean from build in the Makefile so that watch mode can rebuild without wiping dist/. Add nodemon.json and watch:build, watch:docs, watch:pack scripts to standardize file watching. Part of openedx#184 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
tsc doesn't preserve the executable bit from source files, which means bin entry points won't work when the package is installed via npm workspaces (unlike registry installs, where npm sets +x automatically). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
npm skips bin-linking for workspace packages during install, so the openedx CLI from frontend-base isn't available in node_modules/.bin. Document the workaround. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dc52c84 to
d6076ab
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This adds npm workspace support to frontend-base and documents how frontend apps should set up workspaces for local development.
The
buildMakefile target no longer depends onclean, allowing incremental rebuilds — particularly in workspace mode, where a watcher triggersbuildon every change. It also sets the executable bit on allbinentry points after compilation, sincetscdoesn't preserve it and npm doesn't bin-link workspace packages during install.The
pack:watchanddocs:watchscripts are renamed towatch:packandwatch:docsfor consistency with thewatch:buildconvention that turbo uses, andnodemon.pack.jsonis consolidated intonodemon.json.The migration guide gains a full "Set up npm workspaces" section covering turbo config, nodemon, Makefile targets with a bin-linking workaround, and bind-mount usage instructions.
LLM usage notice
Built with assistance from Claude models (mostly Opus 4.6).