Created
August 7, 2018 22:51
-
-
Save andykais/ced7c302747ec86055810e160d603ff5 to your computer and use it in GitHub Desktop.
test a npm package locally in as close a manner to a published package as possible
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function test_package_local() { | |
local cwd="$PWD" | |
local package_folder=$1 | |
cd $1 | |
local tarball=$(npm pack) | |
local fullpath="$package_folder/$tarball" | |
npm install "$fullpath" | |
cd "$cwd" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment