Skip to content

Npm link done right, automatically create symlinks between your node modules

License

Notifications You must be signed in to change notification settings

adogor/npm-autolink

Repository files navigation

npm-autolink

Npm link done right

Npm Npm dependencies Linux Build Windows Build Coverage

Description

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 !

Breaking change in v1

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 ...

Installation

npm install -g npm-autolink

autolink.json file

  • describe linked projects in your workspace
  • npm link will only link those projects

Example autolink.json file:

{
  "link": {
    "@iamasoft/project1": ["@iamasoft/lib1"],
    "@iamasoft/lib1": ["@iamasoft/lib2"],
  }
}

Note : node_modules and bower_components folders are never scanned.

Usage

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

About

Npm link done right, automatically create symlinks between your node modules

Resources

License

Stars

Watchers

Forks

Packages

No packages published