mui-nested-menu — npm package providing infinitely nested menu components for MUI (Material UI). Monorepo managed with Yarn workspaces and Turborepo.
apps/docs/ # Docs site (Vite + React 19 + MUI v7)
packages/mui-nested-menu/ # The published npm package
packages/ui/ # Internal Emotion-based UI components (used by docs)
packages/common/ # Shared types/utils
yarn docs start # Run docs site on localhost:1000
yarn docs build # Build docs for production
yarn menu publish:patch # Bump patch version, build, and publish to npm
yarn menu dist # Build package without publishing
yarn lint # Run eslint + prettier + sort-package-jsonpackages/mui-nested-menu/package.template.json— The published package.json. Peer deps are defined here, NOT in the regular package.json.packages/mui-nested-menu/package.json— Dev/build config only. Direct deps here are for local development.packages/mui-nested-menu/dist/— Built output that gets published to npm.apps/docs/package.json— Docs site deps. Keep MUI version aligned with the main package.
- Update root
README.mdchangelog table - Run
yarn menu publish:patch(or minor/major) from repo root - Authenticate with npm 2FA when prompted
- If the script fails mid-way (e.g. auth issue), the build may already be in
dist/— just runcd packages/mui-nested-menu/dist && npm publish - Commit version bump changes and push
See packages/mui-nested-menu/README.md for detailed publishing notes.
- Peer deps live in
package.template.json, notpackage.json. When adding support for new major versions of MUI or React, update both files. - Postinstall runs
yarn deduplicate && yarn lint:sortpackages— this may reformat package.json files (indentation, key ordering). Commit these changes. - Pre-commit hooks run lint-staged with prettier on staged files.
packages/uiuses Storybook 6 which doesn't support React 19. The peer dep warnings during install are harmless — Storybook isn't used during docs builds.- Parcel caching can cause stale builds. If builds behave unexpectedly:
rm -rf **/.parcel-cache - The docs site wraps demos in
<MTP theme={createTheme()}>(MUI's ThemeProvider) — this is separate from thepackages/uiThemeProvider used for the site shell. - TypeScript versions vary across packages. The docs and main package use TS 5.x. The
packages/uipackage still uses TS 4.9.x. tsc --noEmitin docs will show errors frompackages/ui(custom Emotion Theme type not augmented). These are pre-existing and don't affect the Vite build.