mirror of
https://github.com/sern-handler/cli
synced 2026-06-06 01:16:53 +00:00
feat: Added version command & created readme (#25)
* feat: Created help command * fix: Fixed a typo in version command * feat: Added version command to index.js & changed export type to default * chore: Updated version command * chore: Updated help command * chore: Updated init command * feat: Added version shortcut command * docs: Created README * chore: Added what @jacobees wanted * docs: Changed the README description * docs: Updated README * docs: Fix what Evo wanted * revert: Reverted what Evo wanted * revert: Reverting default export * revert: Reverting the default export * revert: Reverted the default export * feat: Version is now come from package.json * fix: Fixed experimental error * chore: Updated what evo wanted * refractor: Changed v to flag * feat(v): use flags * docs: some stuff Co-authored-by: xxDeveloper <77380166+Murtatrxx@users.noreply.github.com>
This commit is contained in:
33
README.md
Normal file
33
README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Sern CLI
|
||||
|
||||
Our CLI allows you to setup and manage Discord bot projects without writing a single line of code!
|
||||
|
||||
😁 **User Friendly** <br>
|
||||
💦 **Simple** <br>
|
||||
🌱 **Efficient** <br>
|
||||
💪 **Powerful** <br>
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install -g @sern/cli@latest
|
||||
```
|
||||
|
||||
```sh
|
||||
yarn add -g @sern/cli@latest
|
||||
```
|
||||
|
||||
```sh
|
||||
pnpm add -g @sern/cli@latest
|
||||
```
|
||||
|
||||
## Getting Started
|
||||
|
||||
When you install the CLI, you can use our commands with **sern** prefix.
|
||||
|
||||
`sern <command> (opt)<flag>`
|
||||
|
||||
|
||||
## Setting Up Your Project
|
||||
|
||||
#### TODO
|
||||
@@ -1,3 +1,6 @@
|
||||
export function help() {
|
||||
import { version } from '../utilities/version.js';
|
||||
|
||||
export function help({ flags }) {
|
||||
if (flags?.includes('v') || flags?.includes('version')) return version();
|
||||
console.log('This is the Sern CLI help section.\n\n' + 'Fill me up later!');
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ const args = rawArgs
|
||||
.split(/ +/)
|
||||
.filter((e) => !/(--|-)\w+/gm.test(e));
|
||||
|
||||
const cmdName = args[0];
|
||||
const cmdName = args[0] || '';
|
||||
|
||||
const commands = new Map([
|
||||
['help', help],
|
||||
|
||||
7
src/utilities/version.js
Normal file
7
src/utilities/version.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import { createRequire } from 'module';
|
||||
const require = createRequire(import.meta.url);
|
||||
const { version: v } = require('../../package.json');
|
||||
|
||||
export function version() {
|
||||
console.log(`SernHandler CLI v${v}`);
|
||||
}
|
||||
Reference in New Issue
Block a user