Support config file for arguments#9
Conversation
80fa8d1 to
5cd1145
Compare
|
I have a couple of things left to do, but @ryelle I think this is ready for a first look! Remaining items (might add to this list):
Bonus feature:
|
|
I pulled some of the fixes here out into
Instead of creating |
|
@ryelle This is ready to go in! There are a few things remaining that I think will be best in follow up PRs given how long this one has been open:
|
ryelle
left a comment
There was a problem hiding this comment.
🎉 It's working great! Tested all 3 formats (cli, json, and HTML), and with a few different configuration tweaks. Ran into just one issue, and noted a few other minor things, most coming from the changes in master.
Will the values used in the config file for property-values be changed before merge? It looks like test cases, but I just want to check 🙂
|
@ryelle Thanks for the review - feedback addressed! I removed the excessive property-values from the audit until we decide how we will work them in.
I had copied what was in the CSS audit Google Doc - these are what we will want to see eventually but as we have seen, there's some additional thinking to do! I updated it to include just one property value for |
|
I noticed an additional effect of the Property Values navigation issue: Because those report sections all have |
ryelle
left a comment
There was a problem hiding this comment.
🎉 This is working great! I left one comment about the config file itself, but we can merge this and iterate on the config (since there are also questions about property-values).
Thanks for all your hard work here!
| all: true, | ||
| filename: 'wp-admin', | ||
| audits: [ [ 'property-values', 'font-size' ] ], |
There was a problem hiding this comment.
I think I'd rather leave the all property out of the config file - it was intended as a shortcut for the CLI command, but in a config file I think it would be better to list out each audit intentionally.
This doesn't need any special handling, I think we can just remove it from this file.
# Conflicts: # public/wp-admin.html

This PR contains two main additions:
A few notes:
A couple other changes to note:
resultsfrom the JSON format and output the whole result object (this was easier to test and has no other impact as far as I can tell)To test:
Pull down this branch and update the css-audit.config.js to experiment with different audit configurations. Run the command
npm run css-audit -- path/to/cssand confirm that the results display according to what is in the config.Make sure the CLI overrides options added in the config e.g.
npm run css-audit -- path/to/css --format=cli-table. Should display the results as a CLI table.Still to do: