-
Notifications
You must be signed in to change notification settings - Fork 340
/
sites.js
34 lines (30 loc) · 1.05 KB
/
sites.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// @ts-check
const { createSitesCreateCommand } = require('./sites-create')
const { createSitesFromTemplateCommand } = require('./sites-create-template')
const { createSitesDeleteCommand } = require('./sites-delete')
const { createSitesListCommand } = require('./sites-list')
/**
* The sites command
* @param {import('commander').OptionValues} options
* @param {import('../base-command').BaseCommand} command
*/
const sites = (options, command) => {
command.help()
}
/**
* Creates the `netlify sites` command
* @param {import('../base-command').BaseCommand} program
* @returns
*/
const createSitesCommand = (program) => {
createSitesCreateCommand(program)
createSitesFromTemplateCommand(program)
createSitesListCommand(program)
createSitesDeleteCommand(program)
return program
.command('sites')
.description(`Handle various site operations\nThe sites command will help you manage all your sites`)
.addExamples(['netlify sites:create --name my-new-site', 'netlify sites:list'])
.action(sites)
}
module.exports = { createSitesCommand }