Skip to content

amadsen/slides-building-a-node-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This is a slidedeck built with reveal-md. You can view it as markdown or through reveal-md.

Install reveal-md

npm install -g reveal-md

Start Slide Deck

reveal-md Building-A-Node-CLI.md --theme moon

Some of the example commands

Setup

# change directory to the subdirectory wehre we built our example tool
cd thingifier
# install dependencies
npm install
# "globally" install the thingifier CLI
npm link

Supplying Command Line Arguments

thingifier --sean cool --ethan smart --aaron 2

Setting environment variables

export THINGIFIER_FOO=foo; export THINGIFIER_BAR__BAZ=1;

Overriding Environment-based Values with Command Line Arguments

# This assumes you have already run `export THINGIFIER_BAR__BAZ=1`
thingifier --sean cool --ethan smart --aaron 2 --bar.baz=2

npm run scripts

npm test

This will run the tape CLI at ./node_modules/.bin/tape.

npm run example

Take a look at all of the environment variables npm adds for you.

About

Slide deck describing how to build a node JS based CLI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published