mirror of
https://github.com/TECHNOFAB11/ergogen.git
synced 2025-12-11 23:50:05 +01:00
22 lines
505 B
JavaScript
22 lines
505 B
JavaScript
|
|
const fs = require('fs-extra')
|
||
|
|
const path = require('path')
|
||
|
|
const yaml = require('js-yaml')
|
||
|
|
|
||
|
|
const args = require('yargs')
|
||
|
|
.option('config', {
|
||
|
|
alias: 'c',
|
||
|
|
demandOption: true,
|
||
|
|
describe: 'Config yaml file',
|
||
|
|
type: 'string'
|
||
|
|
})
|
||
|
|
.option('output', {
|
||
|
|
alias: 'o',
|
||
|
|
default: path.resolve('output'),
|
||
|
|
describe: 'Output folder',
|
||
|
|
type: 'string'
|
||
|
|
})
|
||
|
|
.argv
|
||
|
|
|
||
|
|
const config = yaml.load(fs.readFileSync(args.c).toString())
|
||
|
|
|
||
|
|
console.log(config)
|