-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
cli(yarn): Add mixed-content yarn script #4344
Conversation
FYI I don't have write access to merge this, so if this looks good to go could a core member merge it? Thanks! |
As for someone consuming this after a global install of LH... i guess they would do: npm explore lighthouse -- npm run mixed-content |
@christhompson I published a prerelease so we can test out this flow: npm install --global lighthouse@canary
npm explore --global lighthouse -- npm run mixed-content http://bbc.com This works for me, though it saves the result in a funny spot (because of the explore call resetting CWD, i guess):
But aside from that it seems roughly fine. |
Thanks for publishing the canary release -- that will help with testing the final documentation. The working-dir issue seems unfortunate but maybe okay overall. It might be best if the example invocation we give includes It might work better to recommend the flow, which would leave the user's shell in the lighthouse directory after running?
|
@christhompson hmmm that sounds cool, but it's not working out so hot on my machine: i'm gonna see if i can trick LH into saving the file locally. |
okay got a solution: npm explore --global lighthouse -- npm run mixed-content -- --output-path=$PWD http://bbc.com this ALMOST works and will work once #4369 is landed. but still, the experience here is pretty ugly. maybe a new commandline flag |
If you're okay with using flags for this, it would definitely make invoking it a lot simpler. I don't want to make precedent for adding a laundry list of flags though. I've uploaded a quick PR for adding a flag to do this, but there may a cleaner way to handle the alternate config than what I did in lighthouse-core/index.js. See #4441 |
We've already added rethinking how we invoke non-default configs to our thoughts for #4333 on next breaking change, so if you're cool with this fix in 2.x releases then sgtm :) |
sgtm |
This adds a new yarn script (as discussed in #3953) which simplifies running the custom configuration required for the mixed-content audit.
@paulirish Could you PTAL to see if this is what you had in mind?