Skip to content

Commit 03a0c3a

Browse files
committed
Made deployment generators use url friendly names for deployment
1 parent 0758972 commit 03a0c3a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Diff for: heroku/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ var Generator = module.exports = function Generator() {
1414
} catch (e) {
1515
this.appname = path.basename(process.cwd());
1616
}
17+
this.appname = this._.slugify(this.appname);
1718
};
1819

1920
util.inherits(Generator, yeoman.generators.NamedBase);
@@ -28,7 +29,7 @@ Generator.prototype.askForName = function askForName() {
2829
}];
2930

3031
this.prompt(prompts, function (props) {
31-
this.deployedName = props.deployedName;
32+
this.deployedName = this._.slugify(props.deployedName);
3233
done();
3334
}.bind(this));
3435
};

Diff for: openshift/index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ var Generator = module.exports = function Generator() {
1414
} catch (e) {
1515
this.appname = path.basename(process.cwd());
1616
}
17+
this.appname = this._.slugify(this.appname).split('-').join('');
1718
};
1819

1920
util.inherits(Generator, yeoman.generators.NamedBase);
@@ -28,7 +29,7 @@ Generator.prototype.askForName = function askForName() {
2829
}];
2930

3031
this.prompt(prompts, function (props) {
31-
this.deployedName = props.deployedName;
32+
this.deployedName = this._.slugify(props.deployedName).split('-').join('');
3233
done();
3334
}.bind(this));
3435
};
@@ -200,7 +201,7 @@ Generator.prototype.gitCommit = function gitInit() {
200201
Generator.prototype.gitForcePush = function gitForcePush() {
201202
if(this.abort || !this.openshift_remote_exists ) return;
202203
var done = this.async();
203-
this.log(chalk.bold("Uploading your initial application code.\n This may take "+chalk.cyan('several minutes')+" depending on your connection speed..."));
204+
this.log(chalk.bold("\nUploading your initial application code.\n This may take "+chalk.cyan('several minutes')+" depending on your connection speed..."));
204205

205206
exec('git push -f '+this.deployedName+' master', { cwd: 'dist' }, function (err, stdout, stderr) {
206207
if (err) {

0 commit comments

Comments
 (0)