-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
27 lines (23 loc) · 714 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// =========== [ REQUIRE ] ===========
var co = require("co");
var dmFile = require("dm-file");
// =========== [ MODULE DEFINE ] ===========
var task = {};
// =========== [ SYNC task.start() ] ===========
task.start = function(filePath) {
try {
var filePath = filePath || undefined;
var configJson = dmFile.getJsonFromFile(filePath);
if (configJson.message) {
configJson = undefined;
}
return configJson;
} catch (e) {
if (process.env.debug === "true") {
console.log("Filename: ", __filename, "\n", e.stack);
}
return e;
}
}; // task.start()
// =========== [ MODULE EXPORT ] ===========
module.exports = task;