Skip to content

feat: support npm workspaces for local development#185

Open
arbrandes wants to merge 1 commit intoopenedx:mainfrom
arbrandes:workspaces-dev
Open

feat: support npm workspaces for local development#185
arbrandes wants to merge 1 commit intoopenedx:mainfrom
arbrandes:workspaces-dev

Conversation

@arbrandes
Copy link
Contributor

@arbrandes arbrandes commented Mar 12, 2026

Description

This adds npm workspace support to frontend-base and documents how frontend apps should set up workspaces for local development.

The build Makefile target no longer depends on clean, allowing incremental rebuilds — particularly in workspace mode, where a watcher triggers build on every change. It also sets the executable bit on all bin entry points after compilation, since tsc doesn't preserve it and npm doesn't bin-link workspace packages during install.

The pack:watch and docs:watch scripts are renamed to watch:pack and watch:docs for consistency with the watch:build convention that turbo uses, and nodemon.pack.json is consolidated into nodemon.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).

@arbrandes arbrandes marked this pull request as draft March 12, 2026 00:14
@arbrandes arbrandes force-pushed the workspaces-dev branch 2 times, most recently from 7af2983 to 7fd4dc4 Compare March 12, 2026 12:10
@arbrandes arbrandes force-pushed the workspaces-dev branch 3 times, most recently from 99b6a94 to b13dabc Compare March 13, 2026 17:53
@arbrandes arbrandes marked this pull request as ready for review March 16, 2026 17:05
@arbrandes arbrandes force-pushed the workspaces-dev branch 4 times, most recently from dc52c84 to d6076ab Compare March 24, 2026 17:10
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.

Also, ensure bin entry points are executable after build, and add
bin-linking workaround to migration guide.

Part of openedx#184

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant