-
Notifications
You must be signed in to change notification settings - Fork 130
/
index.js
48 lines (37 loc) · 1020 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Generated by CoffeeScript 1.7.1
(function() {
var EPub, Q, exec, fs, path, uuid;
exec = require("child_process").exec;
path = require("path");
fs = require("fs");
Q = require("q");
uuid = function() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r;
r = Math.random() * 16 | 0;
return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
});
};
EPub = (function() {
function EPub(options) {
var self;
this.options = options;
if (!options.meta || options.content) {
return false;
}
console.log(options);
self = this;
this.generateTempFile(options).then(function() {
return self.render();
});
}
EPub.prototype.generateTempFile = function() {
var defer;
defer = new Q.defer();
this.uuid = uuid();
return fs.mkdirSync(path.resolve(__dirname, "../", this.uuid));
};
return EPub;
})();
}).call(this);
//# sourceMappingURL=index.map