-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patharchitecture.js
48 lines (44 loc) · 1.16 KB
/
architecture.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
const fs = require('fs');
const PptxGenJS = require('pptxgenjs');
const pptx = new PptxGenJS();
const async = require('async');
try {
fs.mkdirSync('public');
} catch (err) {
}
try {
fs.mkdirSync('public/generated');
} catch (err) {
}
try {
fs.mkdirSync('public/generated/icons');
} catch (err) {
}
// global properties for the deck
pptx.setLayout('LAYOUT_16x9');
const configuration = JSON.parse(fs.readFileSync('configuration.json'));
async.waterfall([
(callback) => {
console.log('Default Diagram...');
require('./pages/default-diagram').generate(pptx, configuration, callback);
},
(callback) => {
console.log('VPC Diagram...');
require('./pages/vpc').generate(pptx, configuration, callback);
},
(callback) => {
console.log('All resources...');
require('./pages/all-resources').generate(pptx, configuration, callback);
},
(callback) => {
console.log('More icons...');
require('./pages/more-icons').generate(pptx, configuration, callback);
}
], (err) => {
if (err) {
console.log('[KO]', err);
} else {
pptx.save('mycatalog-architecture-diagram-template');
console.log('[OK] Processing complete!');
}
});