generator-vovanmozg 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generators/app/index.js +11 -0
- package/generators/node/index.js +26 -0
- package/generators/node/templates/Dockerfile +10 -0
- package/generators/node/templates/index.js +1 -0
- package/generators/node/templates/package.json +9 -0
- package/generators/ruby/index.js +27 -0
- package/generators/ruby/templates/Dockerfile +8 -0
- package/generators/ruby/templates/data/.gitkeep +0 -0
- package/generators/ruby/templates/docker-compose.yml +7 -0
- package/generators/ruby/templates/run.rb +3 -0
- package/package.json +14 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const Generator = require('yeoman-generator');
|
|
2
|
+
|
|
3
|
+
module.exports = class extends Generator {
|
|
4
|
+
initializing() {
|
|
5
|
+
this.log('Available templates:');
|
|
6
|
+
this.log(' - ruby: Ruby project with Docker');
|
|
7
|
+
this.log(' - node: Node.js project with Docker');
|
|
8
|
+
this.log('');
|
|
9
|
+
this.log('Usage: yo vovanmozg:ruby or yo vovanmozg:node');
|
|
10
|
+
}
|
|
11
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const Generator = require('yeoman-generator');
|
|
2
|
+
|
|
3
|
+
module.exports = class extends Generator {
|
|
4
|
+
prompting() {
|
|
5
|
+
return this.prompt([{
|
|
6
|
+
type: 'input',
|
|
7
|
+
name: 'projectName',
|
|
8
|
+
message: 'Project name:',
|
|
9
|
+
default: this.appname
|
|
10
|
+
}]).then(answers => {
|
|
11
|
+
this.answers = answers;
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
writing() {
|
|
16
|
+
this.fs.copyTpl(
|
|
17
|
+
this.templatePath('**/*'),
|
|
18
|
+
this.destinationPath(this.answers.projectName),
|
|
19
|
+
this.answers
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
install() {
|
|
24
|
+
this.npmInstall();
|
|
25
|
+
}
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
console.log('Hello, world!');
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const Generator = require('yeoman-generator');
|
|
2
|
+
|
|
3
|
+
module.exports = class extends Generator {
|
|
4
|
+
prompting() {
|
|
5
|
+
return this.prompt([{
|
|
6
|
+
type: 'input',
|
|
7
|
+
name: 'projectName',
|
|
8
|
+
message: 'Project name:',
|
|
9
|
+
default: this.appname
|
|
10
|
+
}]).then(answers => {
|
|
11
|
+
this.answers = answers;
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
writing() {
|
|
16
|
+
// Copy all template files
|
|
17
|
+
this.fs.copyTpl(
|
|
18
|
+
this.templatePath('**/*'),
|
|
19
|
+
this.destinationPath(this.answers.projectName),
|
|
20
|
+
this.answers
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
install() {
|
|
25
|
+
// No npm install needed for Ruby projects
|
|
26
|
+
}
|
|
27
|
+
};
|
|
File without changes
|
package/package.json
ADDED