Skip to content
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

misc: add cli module diagram #6129

Merged
merged 2 commits into from
Sep 28, 2018
Merged

misc: add cli module diagram #6129

merged 2 commits into from
Sep 28, 2018

Conversation

paulirish
Copy link
Member

No description provided.

Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭏⭎⭎⭏⭎⭏⭎⭏⭏

@@ -8,6 +8,19 @@
const fs = require('fs');
const path = require('path');

/*
* The relationship between these CLI modules:

This comment was marked as resolved.

* index.js : only calls bin.js's begin()
* cli-flags.js : leverages yargs to read argv, outputs LH.CliFlags
* bin.js : CLI args processing. cwd, list/print commands
* run.js : chrome-launcher bits, calling lighthouse-core, output to Printer
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

part of me thinks the functionality here should be available from node more easily too, but that's tomorrow's problem :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could turn cli/index.js into a module and expose it that way. That would let us side step dealing with what gets included in the extension/devtools bundle and let us keep the CLI the same. Biggest issue will probably be with letting you cleanly set up cliFlags not with a long string since we can currently assume defaults set via yargs.

Copy link
Member

@exterkamp exterkamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Love the ASCII diagrams!

@paulirish paulirish merged commit 08db099 into master Sep 28, 2018
@brendankenny brendankenny deleted the clidiagramforbrendan branch September 28, 2018 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants