This repository has been archived by the owner on Mar 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.js
103 lines (99 loc) · 2.84 KB
/
main.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
let fs = require('fs');
let path = require('path');
let Handlebars = require('handlebars');
let _ = require('lodash');
let Utils = require('../../Utils.class');
let constants = require('../../constants');
let metadata = require('../../common_metadata');
let languagesMetadata = [
{
name: "java",
build_tools: [
metadata.build_tools.gradle,
metadata.build_tools.maven
],
templates: [
"MainVerticle.java"
],
dependencies: metadata.dependencies.java_dependencies,
questions: [
metadata.questions.package
],
var_templates: {
package: metadata.var_templates.package,
main: metadata.var_templates.main_class,
src_dir: metadata.var_templates.src_dir
}
},
{
name: "javascript",
build_tools: [
metadata.build_tools.npm,
metadata.build_tools.npm_with_jar
],
dependencies: metadata.dependencies.javascript_dependencies,
templates: [
"main.js"
],
src_dir: "src",
main: "main.js"
},
{
name: "groovy",
build_tools: [
metadata.build_tools.gradle,
metadata.build_tools.maven
],
templates: [
"MainVerticle.groovy"
],
dependencies: metadata.dependencies.groovy_dependencies,
questions: [
metadata.questions.package
],
var_templates: {
package: metadata.var_templates.package,
main: metadata.var_templates.main_class,
src_dir: metadata.var_templates.src_dir
}
},
{
name: "ruby",
build_tools: [
metadata.build_tools.gradle,
metadata.build_tools.maven
],
templates: [
"main.rb"
],
dependencies: metadata.dependencies.ruby_dependecies,
main: "main.rb",
src_dir: path.join("src", "main", "ruby")
},
{
name: "kotlin",
build_tools: [
metadata.build_tools.maven
],
templates: [
"MainVerticle.kt"
],
dependencies: metadata.dependencies.kotlin_dependencies,
questions: [
metadata.questions.package
],
var_templates: {
package: metadata.var_templates.package,
main: metadata.var_templates.main_class,
src_dir: metadata.var_templates.src_dir
}
}
];
let renderFunction = Utils.generateRenderingFunction("starter_generator");
let generationFunction = Utils.generateGenerationFunction(languagesMetadata, renderFunction);
module.exports = {
name: "Vert.x Starter project",
description: "Generate an empty project configured for Vert.x 3 Framework",
generate: generationFunction,
render: renderFunction
};