mirror of
https://github.com/sern-handler/cli
synced 2026-06-27 18:22:20 +00:00
feat(init): deprecate init and bump deps (#102)
Co-authored-by: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com>
This commit is contained in:
@@ -9,7 +9,7 @@ export function help() {
|
||||
|
||||
Welcome!
|
||||
If you're new to ${cyanBright('sern')}, run ${magentaBright(
|
||||
'sern init'
|
||||
'npm create @sern/bot'
|
||||
)} for an interactive setup to your new bot project!
|
||||
|
||||
${green(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { greenBright, redBright, underline } from 'colorette';
|
||||
import { greenBright, redBright, underline, yellowBright } from 'colorette';
|
||||
import { execa } from 'execa';
|
||||
import { findUp } from 'find-up';
|
||||
import ora from 'ora';
|
||||
@@ -19,7 +19,16 @@ import { cloneRepo, installDeps } from '../utilities/install.js';
|
||||
import { npm } from '../utilities/npm.js';
|
||||
import type { PackageManagerChoice } from '../utilities/types.js';
|
||||
|
||||
/** @deprecated Use npm create instead */
|
||||
export async function init(flags: Flags) {
|
||||
console.log(
|
||||
`${yellowBright(
|
||||
'[WARN]:'
|
||||
)} This command is deprecated, use ${greenBright(
|
||||
'npm create @sern/bot'
|
||||
)} instead`
|
||||
);
|
||||
|
||||
let data: PromptData;
|
||||
let git_init = true; // the default;
|
||||
let pm = flags.sync ? undefined : flags.y ? 'npm' : await npm();
|
||||
|
||||
@@ -6,18 +6,21 @@ import { init } from './commands/init.js';
|
||||
|
||||
import { Command } from 'commander';
|
||||
import { plugins } from './commands/plugins.js';
|
||||
import { yellowBright } from 'colorette';
|
||||
export const program = new Command();
|
||||
|
||||
const version: string = '[VI]{{inject}}[/VI]';
|
||||
program
|
||||
.name('sern')
|
||||
.description(help())
|
||||
.version(`sern CLI v${version}`)
|
||||
.version(`sern CLI v${version}`, '-v, --version')
|
||||
.exitOverride(() => process.exit(0));
|
||||
|
||||
program
|
||||
.command(init.name)
|
||||
.description('Quickest way to scaffold a new project')
|
||||
.description(
|
||||
`Quickest way to scaffold a new project ${yellowBright('[DEPRECATED]')}`
|
||||
)
|
||||
.option('-y', 'Finishes setup as default')
|
||||
.option('-s, --sync', 'Syncs the project and generates sern.config.json')
|
||||
.action(init);
|
||||
|
||||
Reference in New Issue
Block a user