-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.js
59 lines (41 loc) · 1009 Bytes
/
index.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
/**
* Adds PM2 to the project.
*
* @partial
* @uses luke:scripts
* @example
* $ yo luke:pm2
*
* @author Luke Chavers <[email protected]>
* @created 2016-12-22
*/
var yeoman = require( "yeoman-generator" );
var baseGenerator = require("../_BaseGenerator");
module.exports = baseGenerator.extend(
{
prompting : function() {
// Locals
var me = this;
// Initialize the base generator
me._initBase();
me.composeWith("luke:scripts");
},
configuring: {
addProvisioningSteps: function() {
var me = this;
// Add provisioning steps to install PM2 & PM2 Web
me._addVagrantStep("npm-install-pm2");
me._addVagrantStep("npm-install-pm2-web");
}
},
writing : {
createPartialFiles : function() {
var me = this;
/** @creates static:core/env/pm2/_example-app.json->env/pm2/example-app.json **/
me.fs.copy(
me.templatePath( "core/env/pm2/_example-app.json" ), me.destinationPath( "env/pm2/example-app.json" )
);
}
}
}
);