msw
1#!/usr/bin/env node
2const yargs = require('yargs')3
4yargs
5.usage('$0 <cmd> [args]')6.command(7'init',8'Initializes Mock Service Worker at the specified directory',9(yargs) => {10yargs
11.positional('publicDir', {12type: 'string',13description: 'Relative path to the public directory',14demandOption: false,15normalize: true,16})17.option('save', {18type: 'boolean',19description: 'Save the worker directory in your package.json',20})21.option('cwd', {22type: 'string',23description: 'Custom current worker directory',24normalize: true,25})26.example('msw init')27.example('msw init ./public')28.example('msw init ./static --save')29},30require('./init'),31)32.demandCommand()33.help().argv34