Skip to content
Myr

pizza

This file

Path

examples/pizza

29 lines · 786 bytes

Last changed by

Merge pull request #397 from tj/revert-208-feature/descriptions-multiline-supportZhiye Libefore adoption64a5a5d

History of this file

Take it

The walk stopped after 200 commits: lines older than 663b313 point at it.

docsTj Holowaychukbefore adoption663b313

lines 1–10why, one step back
1#!/usr/bin/env node
23/**4 * Module dependencies.5 */67var program = require('../');89program10 .version('0.0.1')

Merge pull request #316 from zhiyelee/updatereadmeZhiye Libefore adoption0b95ea2

line 11why, one step back
11 .description('An application for pizzas ordering')

docsTj Holowaychukbefore adoption663b313

lines 12–14why, one step back
12 .option('-p, --peppers', 'Add peppers')
13 .option('-P, --pineapple', 'Add pineapple')14 .option('-b, --bbq', 'Add bbq sauce')

Merge pull request #397 from tj/revert-208-feature/descriptions-multiline-supportZhiye Libefore adoption64a5a5d

line 15why, one step back
15 .option('-c, --cheese <type>', 'Add the specified type of cheese [marble]')

docsTj Holowaychukbefore adoption663b313

lines 16–20why, one step back
16 .option('-C, --no-cheese', 'You do not want any cheese')
17 .parse(process.argv);1819console.log('you ordered a pizza with:');20if (program.peppers) console.log(' - peppers');

Merge pull request #96 from zeMirco/masterTJ Holowaychukbefore adoptione1466b0

line 21why, one step back
21if (program.pineapple) console.log(' - pineapple');

docsTj Holowaychukbefore adoption663b313

lines 22–24why, one step back
22if (program.bbq) console.log(' - bbq');
2324var cheese = true === program.cheese

marbleTj Holowaychukbefore adoption05a1816

line 25why, one step back
25 ? 'marble'

docsTj Holowaychukbefore adoption663b313

lines 26–28why, one step back
26 : program.cheese || 'no';
2728console.log(' - %s cheese', cheese);

Fixed `Commander#args`Tj Holowaychukbefore adoption384ed14

line 29why, one step back
29console.log(program.args);