You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
447 B
18 lines
447 B
8 years ago
|
"use strict";
|
||
|
|
||
8 years ago
|
var tasks = {};
|
||
|
|
||
8 years ago
|
// Code taken from http://stackoverflow.com/a/17204293
|
||
8 years ago
|
// eslint-disable-next-line no-sync
|
||
|
require("fs").readdirSync(__dirname)
|
||
|
.forEach((file) => {
|
||
8 years ago
|
if (file.match(/\.ts$/) !== null && file !== "index.ts") {
|
||
|
const name = file.replace(".ts", "");
|
||
8 years ago
|
|
||
8 years ago
|
// eslint-disable-next-line global-require
|
||
8 years ago
|
tasks[name] = require(`./${file}`);
|
||
8 years ago
|
}
|
||
|
});
|
||
8 years ago
|
|
||
|
export default tasks;
|