NodeJS: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Created page with "== Stuff I wish I had known a few weeks ago == === Setting a browser === I usually use Chrome on Windows and Firefox on Mac. Instead of wiring a browser into my package.json..."
 
Brian Wilson (talk | contribs)
Line 10: Line 10:
=== Reading docs ===
=== Reading docs ===


  npm docs '''package name'''
  npm docs ''packagename''


This jumps to a browser and opens the relevant site. For example, "npm docs react" opens https://reactjs.org.
This jumps to a browser and opens the relevant site. For example, "npm docs react" opens https://reactjs.org.

Revision as of 17:47, 28 November 2018

Stuff I wish I had known a few weeks ago

Setting a browser

I usually use Chrome on Windows and Firefox on Mac. Instead of wiring a browser into my package.json 'start' command with "--open chrome", I now use just "--open" and let it pick. I can set the browser with

npm config set browser {chrome|firefox|lynx}

Reading docs

npm docs packagename

This jumps to a browser and opens the relevant site. For example, "npm docs react" opens https://reactjs.org.