Skip to content
Myr

pm

This file

Path

examples/pm

28 lines · 932 bytes

Last changed by

Fix help section order and padding (#652)Valentin Trinquébefore adoption14e5738

History of this file

Take it

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

Merge pull request #398 from zhiyelee/backoutZhiye Libefore adoptionc6c8472

lines 1–6why, one step back
1#!/usr/bin/env node
23var program = require('..');45program6 .version('0.0.1')

Fix help section order and padding (#652)Valentin Trinquébefore adoption14e5738

line 7why, one step back
7 .description('Fake package manager')

Merge branch 'pr/545'zhiyeleebefore adoptionc6236d9

lines 8–9why, one step back
8 .command('install [name]', 'install one or more packages').alias('i')
9 .command('search [query]', 'search with optional query').alias('s')

Merge pull request #398 from zhiyelee/backoutZhiye Libefore adoptionc6c8472

line 10why, one step back
10 .command('list', 'list packages installed')

Merge branch 'pr/545'zhiyeleebefore adoptionc6236d9

line 11why, one step back
11 .command('publish', 'publish the package').alias('p')

Merge pull request #398 from zhiyelee/backoutZhiye Libefore adoptionc6c8472

lines 12–28why, one step back
12 .parse(process.argv);
1314// here .command() is invoked with a description,15// and no .action(callback) calls to handle sub-commands.16// this tells commander that you're going to use separate17// executables for sub-commands, much like git(1) and other18// popular tools.1920// here only ./pm-install(1) is implemented, however you21// would define ./pm-search(1) and ./pm-list(1) etc.2223// Try the following:24// ./examples/pm25// ./examples/pm help install26// ./examples/pm install -h27// ./examples/pm install foo bar baz28// ./examples/pm install foo bar baz --force