UNPKG

create-aws-cdk-app

Version:

Bin executable for @routineless/nx-aws-cdk plugin

48 lines 1.9 kB
#!/usr/bin/env node "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const create_nx_workspace_1 = require("create-nx-workspace"); const yargs_1 = tslib_1.__importDefault(require("yargs")); const package_json_1 = tslib_1.__importDefault(require("../package.json")); async function main() { console.log(`Start Creating the workspace`); const argv = await (0, yargs_1.default)(process.argv.slice(2)) .demandCommand(1, 1) .usage('Usage: npx $0 <workspace-name>') .example('$0 workspace', 'generages new routineless workspace') .alias('i', 'infra') .describe('i', 'infra application name') .alias('l', 'lambda') .describe('l', 'lambda application name') .option('nxCloud', { choices: ['yes', 'github', 'circleci', 'skip'], describe: 'Connect the workspace to the free tier of the distributed cache provided by Nx Cloud.', default: 'skip', }) .alias('u', 'unitTestRunner') .describe('u', 'Test runner to use for unit tests. Acceptable values: jest, none') .default('u', 'jest') .help('h') .alias('h', 'help').argv; const name = argv._[0]; console.log(`Creating the workspace: ${name}`); const presetName = '@routineless/nx-aws-cdk'; const presetVersion = package_json_1.default.version; const { directory } = await (0, create_nx_workspace_1.createWorkspace)(`${presetName}@${presetVersion}`, { i: argv['i'], l: argv['l'], unitTestRunner: argv['u'], nxCloud: argv.nxCloud, name, packageManager: 'npm', commit: { name: '', email: '', message: 'Initial commit', }, }); console.log(`Successfully created the workspace: ${directory}.`); } main(); //# sourceMappingURL=index.js.map