This commit is contained in:
Evert Prants 2020-11-28 22:26:42 +02:00
parent 037ccb62c4
commit 9841b7d571
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
4 changed files with 17 additions and 12 deletions

4
.npmignore Normal file
View File

@ -0,0 +1,4 @@
/src/
/tsconfig.json
/tsconfig.tsbuildinfo
/tslint.json

View File

@ -2,7 +2,7 @@
"name": "@squeebot/cli",
"version": "3.0.0",
"description": "Squeebot v3 runtime, environments and configuration",
"main": "index.js",
"main": "dist/squeebot.js",
"bin": {
"squeebot": "./dist/squeebot.js",
"squeebotd": "./dist/squeebotd.js"
@ -11,7 +11,8 @@
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc",
"watch": "tsc -w",
"start": "node ./dist/squeebot"
"start": "node ./dist/squeebot",
"prepare": "npm run build"
},
"repository": {
"type": "git",

View File

@ -50,7 +50,7 @@ export class SqueebotCLI {
for (const namep of args.slice(1)) {
await this.bot.repositoryManager.uninstallRepository(namep);
logger.log('Installed repository %s.', namep);
};
}
break;
case 'u':
case 'upd':
@ -71,7 +71,7 @@ export class SqueebotCLI {
}
await this.checkUpdate(repo);
};
}
break;
default:
logger.log(help);
@ -99,7 +99,7 @@ export class SqueebotCLI {
case 'remove':
case 'uninstall':
for (const name of args.slice(1)) {
await this.bot.repositoryManager.uninstallPlugin(name)
await this.bot.repositoryManager.uninstallPlugin(name);
logger.log('Uninstalled plugin %s.', name);
}
break;
@ -303,7 +303,7 @@ export class SqueebotCLI {
await this.bot.config.save();
}
public attach(rl: ReadLine) {
public attach(rl: ReadLine): void {
rl.on('line', (line: string) => {
const split = line.split(' ');