diff --git a/chrome-launcher/README.md b/chrome-launcher/README.md deleted file mode 100644 index 3e00e74aef38..000000000000 --- a/chrome-launcher/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Chrome Launcher [![NPM chrome-launcher package](https://img.shields.io/npm/v/chrome-launcher.svg)](https://npmjs.org/package/chrome-launcher) - -Launch Google Chrome with ease from node. Package moved to https://npmjs.org/package/chrome-launcher. diff --git a/chrome-launcher/chrome-launcher.js b/chrome-launcher/chrome-launcher.js deleted file mode 100644 index 4dca808e38a3..000000000000 --- a/chrome-launcher/chrome-launcher.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @license Copyright 2017 Google Inc. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - */ -'use strict'; - -/** - * chrome-launcher has moved to its own repository and npm package. - * https://github.com/GoogleChrome/chrome-launcher - * https://www.npmjs.com/package/chrome-launcher - * Forwarding stub provided here for users that have deep linked into this - * module, but file will be removed in next major release. - */ - -module.exports = require('chrome-launcher'); diff --git a/chrome-launcher/index.js b/chrome-launcher/index.js deleted file mode 100644 index 4dca808e38a3..000000000000 --- a/chrome-launcher/index.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @license Copyright 2017 Google Inc. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - */ -'use strict'; - -/** - * chrome-launcher has moved to its own repository and npm package. - * https://github.com/GoogleChrome/chrome-launcher - * https://www.npmjs.com/package/chrome-launcher - * Forwarding stub provided here for users that have deep linked into this - * module, but file will be removed in next major release. - */ - -module.exports = require('chrome-launcher'); diff --git a/chrome-launcher/manual-chrome-launcher.js b/lighthouse-core/scripts/manual-chrome-launcher.js similarity index 74% rename from chrome-launcher/manual-chrome-launcher.js rename to lighthouse-core/scripts/manual-chrome-launcher.js index d81ece2db45e..2e13cc4c978c 100755 --- a/chrome-launcher/manual-chrome-launcher.js +++ b/lighthouse-core/scripts/manual-chrome-launcher.js @@ -2,14 +2,6 @@ 'use strict'; -/** - * chrome-launcher has moved to its own repository and npm package. - * https://github.com/GoogleChrome/chrome-launcher - * https://www.npmjs.com/package/chrome-launcher - * This script preserved for Lighthouse's chrome-debug binary, but but file and - * bin entry will be removed in next major release. - */ - /** * @fileoverview Script to launch a clean Chrome instance on-demand. * @@ -34,7 +26,7 @@ if (args.length) { chromeFlags = args.filter(flag => flag.startsWith('--')); const portFlag = chromeFlags.find(flag => flag.startsWith('--port=')); - port = portFlag && portFlag.replace('--port=', ''); + if (portFlag) port = parseInt(portFlag.replace('--port=', ''), 10); enableExtensions = !!chromeFlags.find(flag => flag === '--enable-extensions'); diff --git a/package.json b/package.json index 70f7e3fb868b..fcf136f7bc49 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "./lighthouse-core/index.js", "bin": { "lighthouse": "./lighthouse-cli/index.js", - "chrome-debug": "./chrome-launcher/manual-chrome-launcher.js" + "chrome-debug": "./lighthouse-core/scripts/manual-chrome-launcher.js" }, "engines": { "node": ">=8" @@ -45,7 +45,7 @@ "closure": "cd lighthouse-core && node closure/closure-type-checking.js", "devtools": "bash lighthouse-core/scripts/roll-to-devtools.sh", "compile-devtools": "bash lighthouse-core/scripts/compile-against-devtools.sh", - "chrome": "node chrome-launcher/manual-chrome-launcher.js", + "chrome": "node lighthouse-core/scripts/manual-chrome-launcher.js", "fast": "yarn start --disable-device-emulation --disable-cpu-throttling --disable-network-throttling", "smokehouse": "node lighthouse-cli/test/smokehouse/smokehouse.js", "deploy-viewer": "cd lighthouse-viewer && gulp deploy",