-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Kurami - Command manager | ||
Kurami is a console command manager similar to the command system of Symfony. | ||
|
||
## Why Kurami ? | ||
Nice question, and I have absolutly no answer, | ||
in reality it's just birth because needed to setup fixture in a project and wanted to have something clean. | ||
But you will probably find a better utility than me ^^ | ||
|
||
## Installation | ||
You can install it by using NPM or Yarn: | ||
```bash | ||
npm install kurami | ||
``` | ||
|
||
```bash | ||
yarn add kurami | ||
``` | ||
|
||
## Setup | ||
You can setup Kurami by creating a file named `kurami.json` | ||
in your project root directory to define the path to your command folder | ||
```json | ||
{ | ||
"commandsPath": "./path/to/your/commands/folder" | ||
} | ||
|
||
``` | ||
|
||
## How it works ? | ||
|
||
You can create a command file with this structur : | ||
```js | ||
const { BaseCommand } = require('kurami'); | ||
|
||
class TestCommand extends BaseCommand { | ||
constructor() { | ||
super({ | ||
name: 'test:test', | ||
description: 'Test command' | ||
}); | ||
} | ||
|
||
async run() { | ||
console.log('Test command'); | ||
} | ||
} | ||
|
||
module.exports = TestCommand; | ||
|
||
``` | ||
|
||
Then run ``./node_modules/.bin/kurami {commandName}`` | ||
You can add a npm script to run it more easily : | ||
```json | ||
{ | ||
"scripts": { | ||
"kurami": "kurami" | ||
} | ||
} | ||
``` | ||
|
||
Then run ``npm run kurami {commandName}`` | ||
|
||
And done ! | ||
|
||
## Disclaimer | ||
It's an experimental version, some problem persist like sometime the command didn't exit after is end. | ||
I'm fully open for suggestion and more ! :D | ||
|
||
## Support me | ||
If you like my work, you can support me by buying me a coffee :D | ||
|
||
<a href='https://ko-fi.com/O4O81EAUF' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi1.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a> | ||
<a href="https://www.buymeacoffee.com/nesmon" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 36px !important;" ></a> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.