custom-version
This file
Path
examples/custom-version
17 lines · 482 bytes
Last changed by
Switching to esm-only (#2464)John Geebefore adoptionf4bd470
History of this fileTake it
1#!/usr/bin/env node23// This example shows changing the flags and description for the version option.45import { Command } from 'commander';6const program = new Command();78program9 .version('0.0.1', '-v, --VERSION', 'new version message')10 .option('-s, --sessions', 'add session support')11 .option('-t, --template <engine>', 'specify template engine', 'jade');1213program.parse(process.argv);1415// Try the following:16// node custom-version -v17// node custom-version --VERSION