Npm link done right
When developping multiple node modules it is cumbersome to publish one module to test it in other modules. Npm link is handy in these cases but can be a bit slow (everything is installed globally) and doesn't cover everything.
Npm-autolink come to the rescue by permitting direct links between dev folders.
Main features are :
- Define your workspace modules links in autolink.json file.
- Automatically link or unlink all projects at once
- bin executables are also linked !
V1 of npm-autolink works very differently than v0 :
- only one conf file is loaded
autolink.json
- you can link and unlink many projects at the same time
Tests are coming ...
npm install -g npm-autolink
- describe linked projects in your workspace
npm link
will only link those projects
{
"link": {
"@iamasoft/project1": ["@iamasoft/lib1"],
"@iamasoft/lib1": ["@iamasoft/lib2"],
}
}
Note : node_modules and bower_components folders are never scanned.
npmauto [command] [options]
Print usage information
$ npmauto -h
$ npmauto --help
List all detected packages in workspace and their states
$ npmauto ls
Link all
$ npmauto link
Unkink all
$ npmauto unlink