-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d6447d1
commit 0674ad0
Showing
6 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ Sub Generators: | |
Deployment: | ||
angular-fullstack:openshift | ||
angular-fullstack:heroku | ||
angular-fullstack:docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Description: | ||
Add a Dockerfile to the dist folder. | ||
|
||
Example: | ||
yo angular-fullstack:docker | ||
|
||
This will create: | ||
a dist folder with a Dockerfile in it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
'use strict'; | ||
var util = require('util'); | ||
var yeoman = require('yeoman-generator'); | ||
var exec = require('child_process').exec; | ||
var chalk = require('chalk'); | ||
var path = require('path'); | ||
var s = require('underscore.string'); | ||
|
||
var Generator = module.exports = function Generator() { | ||
yeoman.generators.Base.apply(this, arguments); | ||
this.sourceRoot(path.join(__dirname, './templates')); | ||
this.filters = this.config.get('filters') || {}; | ||
}; | ||
|
||
util.inherits(Generator, yeoman.generators.NamedBase); | ||
|
||
Generator.prototype.copyDockerfile = function copyDockerfile() { | ||
if(this.abort) return; | ||
var done = this.async(); | ||
this.log(chalk.bold('Creating Dockerfile')); | ||
//this.copy('Dockerfile', 'dist/Dockerfile'); | ||
this.fs.copyTpl(this.templatePath('_Dockerfile'), 'dist/Dockerfile', {}); | ||
this.conflicter.resolve(function (err) { | ||
done(); | ||
}); | ||
}; | ||
|
||
Generator.prototype.gruntBuild = function gruntBuild() { | ||
if(this.abort) return; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
JeremyMarshall
via email
Author
Collaborator
|
||
var done = this.async(); | ||
|
||
this.log(chalk.bold('\nBuilding dist folder, please wait...')); | ||
var child = exec('grunt build', function (err, stdout) { | ||
done(); | ||
}.bind(this)); | ||
child.stdout.on('data', function(data) { | ||
this.log(data.toString()); | ||
}.bind(this)); | ||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FROM generatorangularfullstack/angular-fullstack-dist:3.3.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Where's
this.abort
from?