1#!/usr/bin/env node 2'use strict'; 3 4const commander = require('commander'); 5const process = require('process'); 6 7commander 8 // Common scripts 9 .command('configure', `Generate common configuration files`) 10 .command('readme', `Generate README`) 11 .command( 12 'typecheck', 13 `Type check the source TypeScript without emitting JS and watch for file changes` 14 ) 15 .command('build', `Compile the source JS or TypeScript and watch for file changes`) 16 .command('lint', `Lint the files for syntax errors, style guidance, and common warnings`) 17 .command('test', `Run unit tests with an interactive watcher`) 18 .command('clean', `Removes compiled files`) 19 20 // Lifecycle scripts 21 .command('prepare', `Scripts to run during the "prepare" phase`) 22 .command('prepublishOnly', `Scripts to run during the "prepublishOnly" phase`) 23 24 // Pass-through scripts 25 .command('babel', `Runs Babel CLI with the given arguments`) 26 .command('eslint', `Runs ESLint with the given arguments`) 27 .command('jest', `Runs Jest with the given arguments`) 28 .command('tsc', `Runs tsc with the given arguments`) 29 30 .parse(process.argv); 31