Remove --sustainable.hosting since we will soon get the data locally (#2893)

This commit is contained in:
Peter Hedenskog 2020-02-24 22:12:01 +01:00 committed by GitHub
parent ce11edc7d4
commit 3305b61a1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 8 deletions

View File

@ -1349,10 +1349,6 @@ module.exports.parseCommandLine = function parseCommandLine() {
describe: 'Number of page views used when calculating CO2.',
group: 'Sustainable'
})
.option('sustainable.hosting', {
describe: 'Enable host check for green hosting.',
group: 'Sustainable'
})
.option('mobile', {
describe:
'Access pages as mobile a fake mobile device. Set UA and width/height. For Chrome it will use device Apple iPhone 6.',

View File

@ -59,9 +59,7 @@ module.exports = {
case 'pagexray.run': {
// We got data for a URL, lets calculate co2, check green servers etc
const hostingGreenCheck = this.sustainableOptions.hosting
? await hosting.greenDomains(message.data)
: [];
const hostingGreenCheck = await hosting.greenDomains(message.data);
const co2PerDomain = co2.perDomain(message.data, hostingGreenCheck);
const baseDomain = message.data.baseDomain;

View File

@ -14,7 +14,7 @@ if !options.sustainable.pageViews
code --sustainable.pageViews
| to configure the number of page views and calculate total CO2 emission.
if (sustainable.hostingInfo && options.sustainable.hosting)
if (sustainable.hostingInfo)
p #{sustainable.hostingInfo.url} is #{sustainable.hostingInfo.green === true ? 'hosted green! This hoster is using green energy / compensation for its services.' : 'not hosted green.'}
table