Made the project executable via npm link with the "rooster" or

"roosterio" command
This commit is contained in:
Bram van der Veen 2016-06-18 15:50:20 +02:00
parent 743aada838
commit c7bf2fa37e
2 changed files with 28 additions and 4 deletions

View file

@ -1,10 +1,16 @@
{ {
"name": "rooster-io", "name": "rooster.io",
"version": "0.0.1", "version": "0.0.1",
"description": "A new version of rooster.io", "description": "A pretty frontend for schedule made by Schoolmasters",
"main": "index.js", "main": "rooster",
"scripts": { "scripts": {
"test": "node index.js" "start": "rooster start",
"db": "rooster db",
"plugins": "rooster plugins"
},
"bin": {
"rooster": "rooster",
"roosterio": "rooster"
}, },
"author": "Bram van der Veen", "author": "Bram van der Veen",
"license": "MIT", "license": "MIT",

18
rooster Executable file
View file

@ -0,0 +1,18 @@
#!/bin/env node
var args = process.argv.splice(2);
var config = require('./configuration');
if (args[0] == 'start') {
require('./web');
}
else if (args[0] == 'db') {
require('./spider').crawl(config().schoolID);
}
else if (args[0] == 'plugins') {
console.log('Most of the plugins are in a private repo of mine, but when you want to set those up and you have the login creditentials make sure to do this:');
console.log('git submodule init');
console.log('git submodule sync');
console.log('git submodule update');
console.log('After that, make sure to install deps for the plugins in their respective directories under ./plugins');
}