winwsl
v0.0.3
Published
Keep separate node_modules trees for Windows and WSL in the same project.
Maintainers
Readme
winwsl
winwsl keeps separate node_modules trees for Windows and WSL inside the same project root, so switching environments does not force a full reinstall every time.
Install
npm i -g winwslUsage
Run it from a project directory that contains both package.json and package-lock.json:
winwsl
winwsl install
winwsl ci
winwsl run buildBy default it stays quiet unless something fails. Use --verbose to see swap and restore details:
winwsl --verboseRun install and ci through winwsl so it can track when one environment's cache is older than the current package.json and package-lock.json.
If you need to pass npm flags that collide with winwsl flags, insert -- first:
winwsl -- --versionHow it works
node_modulesis treated as the active tree for the current runtime.node_modules_winstores the Windows dependency tree.node_modules_wslstores the WSL dependency tree.winwslrestores the matching cache when it can, and falls back to a fresh install when it cannot.- A
.winwslenvmarker is written so future runs can tell which environment produced a given tree.
Requirements
- Windows or WSL only
- Node.js 20+
- A valid
package.jsonandpackage-lock.jsonin the current working directory
