UNPKG

briareus

Version:

Briareus assists with Feature Branch deploys to ECS

30 lines (23 loc) 682 B
'use strict' const fs = require('fs-extra'); const path = require('path'); const cmd = { setup(yargs, output, cb) { yargs.command({ command: 'init', desc: 'Initialize a project to be deployable with Briareus', handler: (argv) => cmd.run(argv, output, cb) }) }, run(argv, output, cb) { let brianeusDir = argv.projectRootPath + '/.briareus'; // // Fine to do this synchronous since this is a cli tool if (!fs.existsSync(brianeusDir)) { fs.mkdirSync(brianeusDir); } fs.copySync(path.resolve(`${__dirname}/../../dot-briareus/`), brianeusDir); output.write('Initialized Project'); cb(); } } module.exports = cmd;