Skip to content

Instantly share code, notes, and snippets.

@tggreene
Created January 17, 2022 17:43
Show Gist options
  • Save tggreene/6f4b5d4b9abb14e6b48d0c314af64a5c to your computer and use it in GitHub Desktop.
Save tggreene/6f4b5d4b9abb14e6b48d0c314af64a5c to your computer and use it in GitHub Desktop.
NPM Dependency Declarations

NPM Dependency Declarations

Some of the different ways of including npm dependencies:

Git

Note: There's some trickiness with how the package is built when pulling from git you should be able to rely on prepare being run, however, I'veseen a number of times where this has failed on people's machines.

"glamor": "github:tggreene/glamor#f6af50c70494b6e04f6ae5edc4db12320df37329"

Override package Name

"evergreen-ui": "npm:@tggreene/glamor@2.22.0"

Local

Note: This isn't a file uri so don't prepend with slashes.

"evergreen-ui": "file:../../../tggreene/evergreen"
@tggreene
Copy link
Author

tggreene commented Apr 5, 2022

Note that local requires behave quite differently between npm (symlink) and yarn (cp), with yarn you may need to yarn install after changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment