Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sneas/dist-link
A lightning-fast alternative to npm link which excludes node_modules
https://github.com/sneas/dist-link
dist npm-link
Last synced: 4 days ago
JSON representation
A lightning-fast alternative to npm link which excludes node_modules
- Host: GitHub
- URL: https://github.com/sneas/dist-link
- Owner: sneas
- License: mit
- Created: 2021-06-20T09:02:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-20T17:27:20.000Z (over 3 years ago)
- Last Synced: 2024-10-24T02:24:14.182Z (20 days ago)
- Topics: dist, npm-link
- Language: TypeScript
- Homepage:
- Size: 113 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dist-link
[![version](https://img.shields.io/npm/v/@sneas/dist-link.svg?style=flat-square)](http://npm.im/@sneas/dist-link)
A lightning-fast alternative to `npm link` which excludes `node_modules`.
## Motivation
Developing React components with the help of `npm link` tool may produce an error:
```
Error: Invalid hook call. Hooks can only be called inside of the body of a function component.
```The reason is `react` and `react-dom` packages are included into `node_modules` of the source package.
This project solves the above problem by eliminating `node_modules` folder from the source package link.
## Installation
```sh
npm install -g @sneas/dist-link
```## Usage
Run `dist-link` in the root folder of a package you'd like to be linked.
Run `dist-link package-name` in the root folder of a project which is going to use the link.