remove newline and add deprecation warning

This commit is contained in:
Shelley Vohr 2017-10-06 23:29:54 -04:00
parent e8ec1a6ed4
commit a45b1625fc
No known key found for this signature in database
GPG key ID: F13993A75599653C
2 changed files with 6 additions and 2 deletions

View file

@ -335,8 +335,10 @@ if (option.file && !option.webdriver) {
} else if (option.interactive) {
startRepl()
} else {
const welcomeMessage = `Electron ${process.versions.electron} - Build cross platform desktop apps with JavaScript, HTML, and CSS
const welcomeMessage = `
Deprecation Warning: To render the default app, the -d or --default flags will soon need to be used.
Electron ${process.versions.electron} - Build cross platform desktop apps with JavaScript, HTML, and CSS
Usage: electron [options] [path]
A path to an Electron app may be specified. It must be one of the following:
@ -351,6 +353,9 @@ if (option.file && !option.webdriver) {
-i, --interactive Open a REPL to the main process.
-r, --require Module to preload (option can be repeated)
-v, --version Print the version.`
console.log(welcomeMessage)
const indexPath = path.join(__dirname, '/index.html')
loadApplicationByUrl(`file://${indexPath}`)
process.exit(0)
}

View file

@ -19,5 +19,4 @@ document.querySelector('.electron-version').innerText = `Electron v${process.ver
document.querySelector('.chrome-version').innerText = `Chromium v${process.versions.chrome}`
document.querySelector('.node-version').innerText = `Node v${process.versions.node}`
document.querySelector('.v8-version').innerText = `v8 v${process.versions.v8}`
document.querySelector('.command-example').innerText = `${electronPath} path-to-app`