Comments (6)
Oh, got your point. Make sense.
Lets do it 💪 I'm ok to make it in scope of yargs PR. Jut make PR against yargs
branch, so I'll merge it together.
from pwmetrics.
I suppose this is done, now that we have our combined refactor in place? :)
Pedro, feel free to reopen if we got more here!
from pwmetrics.
SGTM
just one question about #48
What exactly do you wanna improve? Passing flags
from confg file?
from pwmetrics.
I was thinking of populating the pwmetrics object with the properties from the config file in case one exists. If there are repeated parameters both in a config file and from the cmd line, then the cmd line should take precedent.
Imagine something like:
performance.config.js
module.exports = {
url: "http://github.com",
json: false,
runs: 5,
flags: {
expectations: true,
},
sheets: {
// sheets configuration
},
expectations: {
ttfmp: {
warn: '>=3000',
error: '>=5000',
},
tti: {
warn: '>=5000',
error: '>=15000',
},
ttfcp: {
warn: '>=1500',
error: '>=3000',
},
psi: {
warn: '>=3000',
error: '>=6000',
},
},
};
Bash
$ pwmetrics --config="path/to/file.js" --json
The json option in the terminal overrides the config option. A use case for this would be wanting to see results with slightly different options but no having to change the actual file (which you may not have permissions to edit). This would also potentially allow any configuration to be set via the command line that can also be set in the config file.
This logic should be done IMO in the bin/cli.js file after yargs has been merged, hence the dependency.
from pwmetrics.
@paulirish do you approve? If so I will start working on this. I do have a question though, what is the rationale behind this loop?
https://github.com/paulirish/pwmetrics/blob/master/bin/cli.js#L24
from pwmetrics.
from pwmetrics.
Related Issues (20)
- Add ability to upload median values only to sheets? HOT 3
- Add zero expectations config
- Question: print only median results in output path HOT 1
- Feature Request: Custom Audit Support HOT 1
- Any verbose/debug options? HOT 1
- Feature Request: Percentiles HOT 1
- Lighthouse v5 migration HOT 2
- Add measure RUM flag
- Metrics so different between CLI's HOT 3
- Publishing PWMetrics in GitHub Package Registry HOT 3
- Feature Request: Upload Comments to Google Sheets HOT 1
- Feature Request: Support alternative median metric or logic HOT 1
- Update `googleapis` dependency HOT 5
- Feature Request: Add additional metrics
- Error while trying to retrieve access token, ENOENT: no such file or directory, mkdir '\Users\my\.credentials\'
- How to export additional metrics from lighthouse?
- Error: connect ECONNREFUSED 127.0.0.1:9222
- No Chrome installations found HOT 2
- Google sheets API error? HOT 8
- Cannot specify --extra-headers CLI option, errors with "Invalid parameters (headers: object expected)"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pwmetrics.