update templates
This commit is contained in:
parent
e3e7f18d4d
commit
d47d03c980
18
bin/init.js
18
bin/init.js
|
@ -83,12 +83,6 @@ function writeGreenlockJs(pkgdir, flags) {
|
|||
// continue
|
||||
}
|
||||
|
||||
if (flags.cluster) {
|
||||
tmpl = tmpl.replace(
|
||||
/options.cluster = false/g,
|
||||
'options.cluster = true'
|
||||
);
|
||||
}
|
||||
if (flags.maintainerEmail) {
|
||||
tmpl = tmpl.replace(
|
||||
/pkg.author/g,
|
||||
|
@ -117,17 +111,9 @@ function writeServerJs(pkgdir, flags) {
|
|||
}
|
||||
|
||||
if (flags.cluster) {
|
||||
tmpl = tmpl.replace(
|
||||
/options.cluster = false/g,
|
||||
'options.cluster = true'
|
||||
);
|
||||
}
|
||||
if (flags.maintainerEmail) {
|
||||
tmpl = tmpl.replace(
|
||||
/pkg.author/g,
|
||||
JSON.stringify(flags.maintainerEmail)
|
||||
);
|
||||
tmpl = tmpl.replace(/cluster: false/g, 'cluster: true');
|
||||
}
|
||||
|
||||
fs.writeFileSync(path.join(pkgdir, serverJs), tmpl);
|
||||
console.info("created '%s'", serverJs);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue