Messing with clis

Mohamed Hayibor
June 2nd, 2016

Outline

 

  • Learning chaos
  • Hubway love story
  • Building and publishing live

How
About some
Questions?

Learning

  • Chaos
  • Chaos
  • Chaos
  • ...
  • more chaos

Learning chaos - How to

 

  • Keep on parsing - lower and lower level of abstractions
  • Figure out dependencies and their gist
  • Getting good at parsing global variables asap

Why building clis === fun

  • Lower n. of loc
  • deep focus on functionality - brevity
  • fast dev cycle - 1 to 2 hours

What we will be building

El paso Bike sharing cli

Building a cli: key points

"bin": {
  "<command>": "cli.js"
}
#!/usr/bin/env node

add to package.json

on top of file

Demo

Building on top - awesome packages: 

  • Commander (multiple commands)
  • Meow
  • Chalk
  • ShellJS

Thanks!

Resources:

Made with Slides.com