You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2017/05/25 20:38:26 UTC
[06/25] cordova-browser git commit: fix failing tests
fix failing tests
Project: http://git-wip-us.apache.org/repos/asf/cordova-browser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-browser/commit/6dd8c6dd
Tree: http://git-wip-us.apache.org/repos/asf/cordova-browser/tree/6dd8c6dd
Diff: http://git-wip-us.apache.org/repos/asf/cordova-browser/diff/6dd8c6dd
Branch: refs/heads/master
Commit: 6dd8c6dd7c222943f926ed4f4debeb591c05be28
Parents: ea7fdc4
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Thu Apr 13 00:18:06 2017 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Thu Apr 13 00:19:09 2017 -0700
----------------------------------------------------------------------
bin/template/cordova/Api.js | 13 +++++++++----
bin/template/cordova/lib/clean.js | 7 ++-----
bin/template/cordova/lib/run.js | 2 +-
3 files changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-browser/blob/6dd8c6dd/bin/template/cordova/Api.js
----------------------------------------------------------------------
diff --git a/bin/template/cordova/Api.js b/bin/template/cordova/Api.js
index 80f79ff..4a75745 100644
--- a/bin/template/cordova/Api.js
+++ b/bin/template/cordova/Api.js
@@ -49,16 +49,21 @@ function Api(platform, platformRootDir, events) {
Api.createPlatform = function (dest, config, options, events) {
- console.log("browser createPlatform !! dest:" + dest);
+ //console.log("browser createPlatform !! dest:" + dest);
events = setupEvents(events);
- var name = config.name();
+ var name = "HelloCordova";
+ var id = "io.cordova.hellocordova";
+ if(config) {
+ name = config.name();
+ id = config.packageName();
+ }
var result;
try {
var creator = require('../../lib/create');
- console.log("creator = " + creator);
- result = creator.createProject(dest, config.packageName(), name, options)
+ // console.log("creator = " + creator);
+ result = creator.createProject(dest, id, name, options)
.then(function () {
// after platform is created we return Api instance based on new Api.js location
// This is required to correctly resolve paths in the future api calls
http://git-wip-us.apache.org/repos/asf/cordova-browser/blob/6dd8c6dd/bin/template/cordova/lib/clean.js
----------------------------------------------------------------------
diff --git a/bin/template/cordova/lib/clean.js b/bin/template/cordova/lib/clean.js
index dff4c06..4175a92 100644
--- a/bin/template/cordova/lib/clean.js
+++ b/bin/template/cordova/lib/clean.js
@@ -27,15 +27,13 @@ var fs = require('fs'),
var run = function(){
- console.log("cleaning ... ");
+ // TODO: everything calls check_reqs ... why?
// Check that requirements are (still) met
if (!check_reqs.run()) {
console.error('Please make sure you meet the software requirements in order to clean an browser cordova project');
process.exit(2);
}
- console.log('Cleaning Browser project');
-
try {
if (fs.existsSync(platformBuildDir)) {
shell.rm('-r', platformBuildDir);
@@ -51,5 +49,4 @@ module.exports.run = run;
module.exports.cleanProject = function(){
console.log("lib/clean will soon only export a `run` command, please update to not call `cleanProject`.");
return run();
-}
-
+};
http://git-wip-us.apache.org/repos/asf/cordova-browser/blob/6dd8c6dd/bin/template/cordova/lib/run.js
----------------------------------------------------------------------
diff --git a/bin/template/cordova/lib/run.js b/bin/template/cordova/lib/run.js
index 083178f..cf0b4e4 100644
--- a/bin/template/cordova/lib/run.js
+++ b/bin/template/cordova/lib/run.js
@@ -45,7 +45,7 @@ module.exports.run = function(args) {
server.servePlatform('browser', {port: args.port, noServerInfo: true})
.then(function () {
- if(startPage == null) {
+ if(!startPage) {
startPage = 'index.html';
}
else {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org