Skip to content

benallfree/npm-relink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPM Relink

This package re-establishes symlinks after npm i has run. This shortcoming of npm is a known issue that the npm team has been slow to fix, so here is a package to do it.

Installation

% npm install -g npm-relink

Usage

Initialize from your project root:

% npm i -D npm-relink
% npm-relink init
% echo ".npm-relink.json" >> .gitignore

Add a postinstall script to package.json:

"scripts": {
    "postinstall": "npm-relink"
}

Any time you run npm install, npm-relink should run afterward. If it doesn't, just run npm i again.

When you add a new link using npm link, run npm-relink init afterward to capture changes.

Further Development

I wish there were a way to do a post hook for dependency installation via npm install <package>. Something like depinstall ticket opened here

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published