-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
executable file
·71 lines (53 loc) · 1.05 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/**
* Created by Denis Bondarenko <[email protected]> on 18.05.2015.
*/
'use strict';
require('babel/polyfill');
var
fs =require('fs-extra'),
//chalk =require('chalk'),
//colors = require('colors'),
clc = require('cli-color')
;
var Main=require('./lib/main').Main;
/*
function compileIt(d){
fs.emptyDir(app.cnf.test.path.tmp,function fsEmptyDir(e){
if(e){
console.log('test: ');
console.log(e);
throw e;
}
app.compilePumlToJson(
app.cnf.test.path.src.pumlFile,
app.cnf.tst.path.dst.compiledTmpFile
)
.then(function importPumlThen(d){
console.log(d);
}).catch(function(e){
console.log(e);
throw e;
});
});
}
*/
function importIt(d){
app.importPuml(
app.cnf.test.path.src.pumlFile
).then(function(r){
console.log(clc.green(r));
}).catch(function(e){
console.log(clc.red('Error: Index#1'));
console.log(e);
throw e;
});
}
var app=new Main();
app.initialized.then(function(r){
importIt(r);
}).catch(function(e){
console.log(clc.red('Error: Index#2'));
console.log(e);
throw e;
});
//