Skip to content

Commit

Permalink
Keep track of appId
Browse files Browse the repository at this point in the history
  • Loading branch information
diegonetto committed Mar 10, 2014
1 parent b1d922a commit 736b003
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ var chalk = require('chalk');
var xml2js = require('xml2js');
var common = require('../lib/common');

console.log(common.ionic);

var IonicGenerator = module.exports = function IonicGenerator(args, options, config) {
yeoman.generators.Base.apply(this, arguments);

this.argument('appName', { type: String, required: false });
this.appName = this.appName || path.basename(process.cwd());
this.appName = mout.pascalCase(this.appName);
this.appId = 'com.example.' + this.appName;
this.appPath = 'app';
this.root = process.cwd();

Expand All @@ -29,9 +28,10 @@ var IonicGenerator = module.exports = function IonicGenerator(args, options, con

util.inherits(IonicGenerator, yeoman.generators.Base);

IonicGenerator.prototype.cordovaInit = function cordovaInit() {
cordova.create('.', 'com.example.' + this.appName, this.appName);
console.log(chalk.yellow('Creating a new cordova project with name "' + this.appName + '" and id "' + this.appName));
IonicGenerator.prototype.init = function init() {
console.log(common.ionic);
cordova.create('.', this.appId, this.appName);
console.log(chalk.yellow('Creating a new cordova project with name "' + this.appName + '" and id "' + this.appId + '"'));
};

IonicGenerator.prototype.askForCompass = function askForCompass() {
Expand Down
2 changes: 1 addition & 1 deletion lib/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var chalk = require('chalk');
var common = module.exports;

common.ionic = chalk.cyan(
"\n _ _" +
" _ _" +
"\n (_) (_)" +
"\n _ ___ _ __ _ ___" +
"\n | |/ _ \\| '_ \\| |/ __|" +
Expand Down

0 comments on commit 736b003

Please sign in to comment.