A powerful toolkit for managing multiple node-modules in a flexibly defined workspace, just the way you like it.
-
build
and watch (typescript) -
sync
and watch (dependency graph) -
bump
(versions in dependency graph order) -
publish
(to NPM) -
outdated
(list all outdated modules)
Install
npm install -g msync
Usage
Create a sync.yaml
file to define the modules within your workspace.
modules:
- ./sample/*/package.json
- ./sample/libs/*/package.json
watchPattern: /lib/**/*.js # The files that when changed cause a sync to occur.
Run the command line using msync
within your workspace folder to list, sync or build the modules:
ls (list)
sync
build (typescript)
outdated
watch
Starts watchers for build
and sync
in new tabs. Requires a terminal like iTerm2 that can recieve "new tab" instructions.
delete
Deletes common transient folders from across all modules, such as logs (yarn-error.log
and npm-debug.log
) or yarn.lock
files, or node_modules
folder etc.
tsconfig
Common transformations across typescript configuration files, eg flipping the noUnusedLocals
switch.
audit
Runs an NPM security audit across all modules.
Help
Use the --help
(-h
) flag to see the options for each command, eg:
msync sync --help
Ignore
You can ignore file paths
and module names
by declaring an ignore
block in the sync.yaml
definition:
ignore:
paths:
- ./sample/**/ignore-folder
names:
- 'module-4'
Other Approaches
Here are some other approaches to the problem that you might prefer:
-
NPM link - Our old friend
npm link
. Good luck with that! -
Lerna: A tool for managing JavaScript projects with multiple packages.
Next Steps
- workspaces