-
Notifications
You must be signed in to change notification settings - Fork 11
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
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:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:
results
from 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/css
and 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: