Skip to content

Commit

Permalink
Merge branch 'main' into feat-fund-me-npm
Browse files Browse the repository at this point in the history
  • Loading branch information
nesmon committed Jan 7, 2023
2 parents 80e9384 + 3138ed8 commit 9494eac
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
16 changes: 14 additions & 2 deletions Lib/kurami.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const fs = require('fs');
const path = require('path');
const config = require(path.resolve() + '/kurami.json');

class Kurami {
constructor() {
this.path = path.resolve() + '/' + config.commandsPath
this.config;
this.path;
}

getCommandsInfo() {
Expand Down Expand Up @@ -36,6 +36,8 @@ class Kurami {
}

run(args) {
this.setConfig()

const commands = this.getCommandsInfo()

if (args[0] === "help" || args.length === 0) {
Expand All @@ -61,6 +63,16 @@ class Kurami {
console.log(`- ${command.name} - ${command.description}`)
})
}

setConfig() {
if (!fs.existsSync(path.resolve() + '/kurami.json')) {
console.log('Kurami config file not found.')
return process.exit()
}

this.config = require(path.resolve() + '/kurami.json');
this.path = path.resolve() + '/' + this.config.commandsPath
}
}

module.exports = new Kurami();
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ It's an experimental version, some problem persist like sometime the command did
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
If you like my work, you can support me by buying me a coffee and/or following me on twitter :D

<a href='https://ko-fi.com/nesmon' 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>
<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>
<a href="https://twitter.com/MaidNenes" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/twitter/follow/Thomasbnt_?color=%231DA1F2&label=Follow%20me&labelColor=white&logo=Twitter&style=for-the-badge" alt="My Twitter profile" alt="My Twitter profile"/></a>
3 changes: 1 addition & 2 deletions test/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9494eac

Please sign in to comment.