1.2.2 • Published 4 years ago

yarnswush v1.2.2

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago
/\_/\__ _ _ __ _ __ / _\_      ___   _ ___| |__  
\_ _/ _` | '__| '_ \\ \\ \ /\ / / | | / __| '_ \ 
 / \ (_| | |  | | | |\ \\ V  V /| |_| \__ \ | | |
 \_/\__,_|_|  |_| |_\__/ \_/\_/  \__,_|___/_| |_|
                                                 

YARNSwush

Yarnswush will help you switch to Yarn from using Npm by subsituting you npm commands for yarn alternatives.

Cases where it can be helpful are

  • Copying and pasting NPM commands from a website to a terminal and running it with Yarn.

Installing

If you are using BASH

$ yarn global add yarnswush

Then run any npm command. eg. npm i keypress; preview

It currently covers

  • npm install :- save and save dev.
  • npm uninstall :-
  • npm global install
  • npm global uninstall
  • npm run
  • npm

Uninstalling

After yarn global remove yarnswush, Remove this line from your ~/.bashrc if you are using Bash, ~/.zshrc if you are using ZSH.

  • This might not be necessary. The postuninstall script takes care of removing this line for these files.
npm () { yarnswush "$@"; }

Testing

I use Jest. I wrote this TDD style baby. Saved me writing unnecessary code. Install yarn globally and run Jest

$ yarn global add jest
$ jest ./index.test.js

Changelog

  • v1.2.1
    • Fixed bash function in .bashrc file
  • v1.2.0
    • Postuninstall script removes yarnswush from shell files.
    • Fix Ctrl + k to use NPM command instead.
1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago