This repository was archived by the owner on Feb 20, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeta.js
More file actions
91 lines (91 loc) · 2.33 KB
/
Copy pathmeta.js
File metadata and controls
91 lines (91 loc) · 2.33 KB
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
const path = require('path')
// 尝试获取配置文件地址
const siteRootPath = path.resolve('.', './')
module.exports = {
helpers: {
raw: function (options) {
return options.fn(this)
}
},
prompts: {
name: {
'type': 'string',
'required': true,
'message': 'Project name'
},
description: {
'type': 'string',
'required': false,
'message': 'Project description',
'default': 'ddv gitlab hooks project'
},
author: {
'type': 'string',
'message': 'Author',
'default': 'ddv gitlab hooks'
},
listenType: {
'type': 'list',
'required': true,
'message': 'hooks listen type',
'choices': ['tcp', 'ssl']
},
listenDomain: {
'type': 'string',
'required': true,
'message': 'hooks listen domain',
'default': 'hooks.abc.com'
},
listenPort: {
'type': 'number',
'required': true,
'message': 'hooks listen port',
'default': 80
},
repositoryDir: {
'type': 'string',
'required': true,
'message': 'apache2 conf ',
'default': `${siteRootPath}/repository`
},
confFile: {
'type': 'string',
'message': 'apache2 conf file path',
'default': `${siteRootPath}/laravel.php.conf`
},
domain: {
'type': 'string',
'message': 'apache2 conf file domain suffix',
'default': 'git.abc.com'
},
serverAdmin: {
'type': 'string',
'message': 'apache2 server admin email',
'default': 'webmaster@localhost'
},
rootLog: {
'type': 'string',
'message': 'apache2 server log root dir',
'default': '/disk2/log/phpweb/'
},
DirectoryIndex: {
'type': 'string',
'message': 'apache2 default directory index',
'default': 'index.html index.php'
},
secret: {
'type': 'string',
'message': 'gitlab secret key',
'required': true,
'default': guid()
}
},
completeMessage: '{{#inPlace}}To get started:\n\n npm install # Or yarn\n npm run dev{{else}}To get started:\n\n cd {{destDirName}}\n npm install # Or yarn\n npm run dev{{/inPlace}}'
}
function guid () {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0
var v = c === 'x' ? r : (r & 0x3 | 0x8)
return v.toString(16)
})
}