Passed
Push — main ( 7025c8...8c0a07 )
by Bjarn
03:07 queued 01:44
created

src/commands/linkCommand.ts

Complexity

Total Complexity 0
Complexity/F 0

Size

Lines of Code 10
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 9
mnd 0
bc 0
fnc 0
dl 0
loc 10
bpm 0
cpm 0
noi 0
c 0
b 0
f 0
1
import commander from 'commander'
2
import SitesController from '../controllers/sitesController'
3
4
export default (program: typeof commander): commander.Command => program
5
    .command('link')
6
    .option('-t, --type <type>', 'Provide a type for generating an optimized Nginx config. Supported: laravel, magento2, magento1.')
7
    .description('Create a new Nginx vhost config for your current project.')
8
    .action((options: commander.Command) => {
9
        (new SitesController()).executeLink(options.type).catch(err => console.log(err.message))
10
    })