`yarn link` for npm Module Development

I made a fork of tachyons-as-props in my quest to replace tachyons + sass with glamorous.

A nice way to work on a node_module locally without having to publish it is to use yarn link (or npm link if you’re so inclined).

The steps are pretty easy: 1. Go to the local folder of the module you are currently working on:

  • cd module_in_progress
  1. Type yarn link
    • You should see a “success” message
  2. Go to your consuming project’s folder
    • cd my_project
  3. Type yarn link module_in_progress

Now if you ls node_modules in your consuming project’s folder, you should see that module_in_progress has been symlinked to its folder (as opposed to being installed as normal).

Check out my other articles, or sign up for my newsletter:

No spam. Just code stuff, unsolicited music recommendations, etc.