New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

npm-ln

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-ln

npm install modules 实现软链接

latest
npmnpm
Version
0.1.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

简介

npm包的软链接

背景

在用react的时候总是需要全家桶,什么babel webpack等,差不多一个项目的node_modules就要 100M以上,然后在想在每个项目能不能复用babelwebpack等公用库。 然后就知道了linux软链接的功能;

每一个项目的node_modules的库基本都是软链接公用node_modules的,功能基本不会丢失, 每一个库都是软链接的大小。

使用

  • 安装

npm install -g npm-ln

  • 配置 在 config.js 里面配置 INSTALLED_PATH,这个是公用库的路径; NODE_MODULES_PATH这个是安装到项目的哪个位置,默认是安装到 node_modules

  • 命令

    • npm-ln install 包名;
    • npm-ln install 会在package.json里面找并安装依赖;
    • npm-ln install --save

FAQs

Package last updated on 23 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts