Created
May 22, 2018 11:00
ypx - npx for yarn
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
#!/usr/bin/env bash | |
package_name=$1 | |
temp_dir="/tmp/ypx/$package_name/$(date +%s%N)" | |
mkdir -p $temp_dir | |
(cd $temp_dir; yarn add $package_name) && (PATH="$temp_dir/node_modules/.bin":$PATH; "$@") | |
rm -rf $temp_dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl -Lo- http://bit.ly/yarn-ypx | bash -s your_command_here