Skip to content
This repository was archived by the owner on Jul 2, 2020. It is now read-only.

Commit 054d9b4

Browse files
author
oraclejet
committed
Update to 0.0.7
1 parent b16bfd6 commit 054d9b4

File tree

3 files changed

+27
-24
lines changed

3 files changed

+27
-24
lines changed

common/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,14 @@ module.exports =
6464
{
6565
return new Promise(function(resolve,reject)
6666
{
67-
appDir = path.resolve(appDir);
67+
var appDir = _handleAbsolutePath(generator);
68+
6869
fs.stat(appDir, function(err,stats)
6970
{
7071
if (err)
7172
{
7273
// Proceed to scaffold if appDir directory doesn't exist
73-
resolve();
74+
resolve(appDir);
7475
}
7576
else
7677
{
@@ -80,7 +81,7 @@ module.exports =
8081
if (isEmpty)
8182
{
8283
// Proceed to scaffold if appDir directory is empty
83-
resolve();
84+
resolve(appDir);
8485
}
8586
else
8687
{

generators/hybrid/index.js

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -59,32 +59,34 @@ var OracleJetHybridCreateGenerator = generators.Base.extend({
5959
{
6060
var done = this.async();
6161
common.validateAppDirNotExistsOrIsEmpty(this)
62-
.then(function()
62+
.then(function(validAppDir)
6363
{
64+
this.appDir = path.basename(validAppDir);
65+
66+
// platforms that will be added by cordova API.
67+
// note if this.options.platforms is not provided
68+
// it will test out the platform candidates during the prompting
69+
// lifecycle; otherwise it will parse the provided
70+
// platforms options and filter to those that are capable
71+
// on the user's machine
72+
this._platformsToProcess;
73+
74+
if (!this.options.appName)
75+
{
76+
this.options.appName = _getAppBaseName(this.appDir);
77+
}
78+
79+
if (!this.options.appId)
80+
{
81+
this.options.appId = _getDefaultAppId(this.appDir);
82+
}
83+
6484
done();
65-
})
85+
}.bind(this))
6686
.catch(function(err)
6787
{
6888
this.env.error(commonMessages.prefixError(err));
6989
}.bind(this));
70-
71-
// platforms that will be added by cordova API
72-
// note if this.options.platforms is not provided
73-
// it will test out the platform candidates during the prompting
74-
// lifecycle; otherwise it will parse the provided
75-
// platforms options and filter to those that are capable
76-
// on the user's machine
77-
this._platformsToProcess;
78-
79-
if (!this.options.appName)
80-
{
81-
this.options.appName = _getAppBaseName(this.appDir);
82-
}
83-
84-
if (!this.options.appId)
85-
{
86-
this.options.appId = _getDefaultAppId(this.appDir);
87-
}
8890
},
8991

9092
prompting: function()

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "generator-oraclejet",
3-
"version": "0.0.6",
3+
"version": "0.0.7",
44
"license":"UPL-1.0",
55
"description": "initial",
66
"keywords":

0 commit comments

Comments
 (0)