mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Get started on CLI
This commit is contained in:
18
src/cli/index.ts
Normal file
18
src/cli/index.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import program from 'commander';
|
||||
|
||||
const pkg = require('../../package.json');
|
||||
|
||||
import start from './start';
|
||||
import create from './create';
|
||||
|
||||
program.version(pkg.version, '-v, --version');
|
||||
|
||||
program.name('directus').usage('[command] [options]');
|
||||
|
||||
program.command('create <directory>').description('Create a new Directus Project').action(create);
|
||||
|
||||
program.command('start').description('Start the Directus API').action(start);
|
||||
|
||||
program.parseAsync(process.argv);
|
||||
Reference in New Issue
Block a user