27 lines
631 B
JavaScript
Executable File
27 lines
631 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
import { hideBin } from 'yargs/helpers';
|
|
import yargs from 'yargs';
|
|
import { join } from 'path';
|
|
|
|
import print from './command/print.js'
|
|
import init from './command/init.js'
|
|
import schema from './command/schema.js';
|
|
import consola from 'consola';
|
|
|
|
consola.raw = (...args) => console.log(...args);
|
|
|
|
yargs(hideBin(process.argv))
|
|
.config({
|
|
consola
|
|
})
|
|
.default('source', join( process.cwd(), 'CHANGELOG.yml' ))
|
|
.describe('source', 'changelog source')
|
|
.command({
|
|
...print,
|
|
command: '$0',
|
|
})
|
|
.command(init)
|
|
.command(schema)
|
|
.command(print).help().parse();
|