-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathhierarchical.js
114 lines (107 loc) · 2.25 KB
/
hierarchical.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
var Mustache = require('mustache');
var Fs = require("fs");
// var participants = [
// 'joaquimserafim',
// 'nunoveloso',
// 'satazor',
// 'johnbrett',
// 'andrefs',
// 'davecocoa',
// 'pedrocarrico',
// 'paulovieira',
// 'taterbase',
// 'filipediasferreira',
// 'KidkArolis',
// 'dymonaz',
// 'marcooliveira',
// 'rjsmelo',
// 'miguelampereira',
// 'zkiiito',
// 'balazsgabor',
// 'hugomota',
// 'pvhee',
// 'marcelombc',
// 'jamgomes',
// 'baldasman',
// 'antoniocapelo',
// 'ana-rodrigues',
// 'suprememoocow',
// 'davidfoliveira',
// 'pmarques',
// 'gergelyke',
// 'anarcastanho'
// ];
var participants = [
'joaquimserafim',
'nunoveloso',
'satazor',
'johnbrett',
'andrefs',
'davecocoa',
'pedrocarrico',
'paulovieira',
'taterbase',
'filipediasferreira',
'KidkArolis',
'dymonaz',
'marcooliveira',
'rjsmelo',
'miguelampereira',
'zkiiito',
'balazsgabor',
'hugomota',
'pvhee',
'marcelombc',
'jamgomes',
'baldasman',
'antoniocapelo',
'ana-rodrigues',
'suprememoocow',
'davidfoliveira',
'pmarques',
'gergelyke',
'anarcastanho',
'danielfdsilva',
'nelsonic',
'iteles',
'robertkowalski',
'DJCordhose',
'axfcampos',
'yarcub',
'peeofive',
'trodrigues',
'tomcartwrightuk',
'cajadas',
'xtravanta',
'rdquintas',
'lukebond',
'phuu',
'sandromaio',
'JoaoCasalNovo',
'sgtcarneiro',
'jvpereira',
'a-c-m',
'MMendes999',
'BrunoAssuncao',
'bmmrodrigues',
'sugendran',
'catarinamoura',
'yrezgui',
'pmiguelrn',
'nihildacta'
];
for(var i in participants) {
var username = participants[i];
var outputpath = './lib/plugins/' + username;
var indexTmpl = Fs.readFileSync(__dirname + '/tmpl/index.js').toString();
var indexOutput = Mustache.render(indexTmpl, {username: username});
var testTmpl = Fs.readFileSync(__dirname + '/tmpl/test.js').toString();
var testOutput = Mustache.render(testTmpl, {username: username});
Fs.writeFileSync(outputpath + '/index.js', indexOutput);
try {
Fs.mkdirSync('./test/plugins');
} catch (e) {
// ignore
}
Fs.writeFileSync('./test/plugins/' + username + '/index.js', testOutput);
}