msw

Форк
0
/
index.js 
33 строки · 863.0 Байт
1
#!/usr/bin/env node
2
const yargs = require('yargs')
3

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

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.