feat: Implement draft version of CLI package

This commit is contained in:
Faruk AYDIN
2022-02-26 00:29:37 +03:00
committed by Ömer Faruk Aydın
parent 059c039a8b
commit c732780672
16 changed files with 7625 additions and 146 deletions

View File

@@ -1,6 +1,5 @@
#!/usr/bin/env node
const packageJson = require('../package');
const version = packageJson.version;
console.log(`Automatisch@${version} CLI tool`);
process.exit(0);
const oclif = require('@oclif/core')
oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle'))

View File

@@ -0,0 +1,3 @@
@echo off
node "%~dp0\automatisch" %*

17
packages/cli/bin/dev Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env node
const oclif = require('@oclif/core')
const path = require('path')
const project = path.join(__dirname, '..', 'tsconfig.json')
// In dev mode -> use ts-node and dev plugins
process.env.NODE_ENV = 'development'
require('ts-node').register({project})
// In dev mode, always show stack traces
oclif.settings.debug = true;
// Start the CLI
oclif.run().then(oclif.flush).catch(oclif.Errors.handle)

3
packages/cli/bin/dev.cmd Normal file
View File

@@ -0,0 +1,3 @@
@echo off
node "%~dp0\dev" %*