move projects to commands.projects

develop
lub 7 years ago
parent f85f5e47df
commit 1eeb3365fc

@ -58,6 +58,7 @@ function fetchCommand(input, commands, threshhold){
commands.fetchCommand = fetchCommand;
commands.getEditDistance = getEditDistance;
commands.projects = {}
fs.readdirSync('./projects').forEach((file) => {
let project = file.match(/^([a-z]*)\.js$/);
if(!project) {
@ -66,7 +67,7 @@ fs.readdirSync('./projects').forEach((file) => {
}
project = project[1];
commands[project] = require('./projects/' + file);
commands.projects[project] = require('./projects/' + file);
});
/* //Test code