Sequoia / clijs

Nodeschool lesson-set for learning to build shell tools with javascript
GNU General Public License v3.0
5 stars 0 forks source link

link & bin #2

Open Sequoia opened 9 years ago

Sequoia commented 9 years ago

This lesson will show how to use the bin package property to specify the CLI entry point for a module & NPM link to link your module to a local development copy.

  1. How do I package my tool for npm so people can npm install -g it & use it? :point_right: package.bin
  2. How can I test this locally while I develop my module? :point_right: npm link

Exercise should tell the user the name of the dummy module they'll be "creating" (the name they should put in package.json for their solution), e.g. supertool. User should create a package.json with bin set in a directory & npm link it. clijs verify from there should:

  1. Read their package.json & confirm that it has the bin property set up properly
  2. which supertool should yield something
  3. That something should be a link, and following the link should point you to the file specified by package.bin