[config] [s]: import main packages and set params
This commit is contained in:
22
packages/create-portal-app/index.js
Normal file → Executable file
22
packages/create-portal-app/index.js
Normal file → Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
const { program } = require('commander')
|
||||||
|
const chalk = require('chalk')
|
||||||
|
const prompts = require('prompts')
|
||||||
|
const package = require('./package.json')
|
||||||
|
|
||||||
|
/* Output path to create new portal app */
|
||||||
|
let path = ''
|
||||||
|
|
||||||
|
|
||||||
|
/* Commander parameters to specify CLI behavior */
|
||||||
|
program.name(package.name)
|
||||||
|
.version(package.version)
|
||||||
|
.arguments('[dir]')
|
||||||
|
.usage(`${chalk.yellow('[dir]')}`)
|
||||||
|
.description({
|
||||||
|
dir: 'Directory to be used on install Portal.js'
|
||||||
|
})
|
||||||
|
.action(name => path = name)
|
||||||
|
.allowUnknownOption()
|
||||||
|
.parse(process.argv)
|
||||||
|
|||||||
Reference in New Issue
Block a user