Skip to content

Browser Platform Release Preparation (Cordova 9) #70

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ temp
*.jar
.vscode
node_modules/
coverage/
.nyc_output/
6 changes: 3 additions & 3 deletions bin/template/cordova/Api.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ Api.prototype.prepare = function (cordovaProject, options) {
"sizes": "128x128"
} ******/
// ?Is it worth looking at file extentions?
return {'src': icon.src,
return { 'src': icon.src,
'type': 'image/png',
'sizes': (icon.width + 'x' + icon.height)};
'sizes': (icon.width + 'x' + icon.height) };
});
manifestJson.icons = manifestIcons;

Expand All @@ -230,7 +230,7 @@ Api.prototype.prepare = function (cordovaProject, options) {
}

// get start_url
var contentNode = this.config.doc.find('content') || {'attrib': {'src': 'index.html'}}; // sensible default
var contentNode = this.config.doc.find('content') || { 'attrib': { 'src': 'index.html' } }; // sensible default
manifestJson.start_url = contentNode.attrib.src;

// now we get some values from start_url page ...
Expand Down
8 changes: 5 additions & 3 deletions bin/template/cordova/lib/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,18 @@ module.exports.run = function (args) {
}

var server = cordovaServe();
server.servePlatform('browser', {port: args.port, noServerInfo: true, noLogOutput: args.noLogOutput})
server.servePlatform('browser', { port: args.port, noServerInfo: true, noLogOutput: args.noLogOutput })
.then(function () {
if (!startPage) {
// failing all else, set the default
startPage = 'index.html';
}
var projectUrl = url.resolve('http://localhost:' + server.port + '/', startPage);

var projectUrl = (new url.URL(`http://localhost:${server.port}/${startPage}`)).href;

console.log('startPage = ' + startPage);
console.log('Static file server running @ ' + projectUrl + '\nCTRL + C to shut down');
return server.launchBrowser({'target': args.target, 'url': projectUrl});
return server.launchBrowser({ 'target': args.target, 'url': projectUrl });
})
.catch(function (error) {
console.log(error.message || error.toString());
Expand Down
44 changes: 28 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,36 @@
"url": "https://github.com/apache/cordova-browser"
},
"bugs": {
"url": "https://issues.apache.org/jira/browse/CB"
"url": "https://github.com/apache/cordova-browser/issues"
},
"keywords": [
"cordova",
"browser",
"apache"
],
"scripts": {
"eslint": "eslint bin && eslint spec",
"cover": "nyc jasmine",
"eslint": "eslint bin spec",
"jasmine": "jasmine",
"test": "npm run eslint && npm run jasmine"
"test": "npm run eslint && npm run cover"
},
"dependencies": {
"cordova-common": "^3.0.0",
"cordova-serve": "^2.0.0",
"nopt": "^3.0.6",
"cordova-common": "^3.1.0",
"cordova-serve": "^3.0.0",
"nopt": "^4.0.1",
"shelljs": "^0.5.3"
},
"devDependencies": {
"eslint": "^4.0.0",
"eslint-config-semistandard": "^11.0.0",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-import": "^2.3.0",
"eslint-plugin-node": "^5.0.0",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^3.0.1",
"jasmine": "^2.5.3",
"tmp": "^0.0.26"
"eslint": "^5.12.0",
"eslint-config-semistandard": "^13.0.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"jasmine": "^3.3.1",
"nyc": "^13.1.0",
"tmp": "0.0.33"
},
"author": "Apache Software Foundation",
"contributors": [
Expand All @@ -57,5 +59,15 @@
"engines": {
"node": ">=6.0.0"
},
"engineStrict": true
"engineStrict": true,
"nyc": {
"include": [
"bin/lib/**",
"bin/templates/cordova/**"
],
"reporter": [
"lcov",
"text"
]
}
}