-
Notifications
You must be signed in to change notification settings - Fork 34
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
Command line interface #14
Comments
I'm working on it, PR is coming :) $ cat style.css | specificity-graph > output.json
$ specificity-graph style.css output.json
$ specificity-graph style.css -a // output some stats about the specificity The command create a json, then open index.html and you should see the graph.
|
Whooaa! Great |
Cool! I was going to say the reason I haven't created any CLI is because for a CLI my intention would be to be able to run it without using a browser, i.e. something like that it just saves the graph as an SVG to file. As I used
I'm not against moving away from |
What about rendering d3 in the process - as far as I know this might be possible. Have't tried it yet though. And am just sharing ideas. :) |
The CLI must be KISS I think, so no server, no chart generation etc. The cli generates a json (some stats too) : Verbose:Graph:@pocketjoso @stefanjudis Yup we can, but why ? We already have the index.html, so with a JSON it's easy to build as many graph we want. Maybe, we can build a directory for specificity, no ? (Istanbul creates a directory coverage for unit tests) Ex: $ specificity-graph style.css specificity
$ cat style.css | specificity-graph -o=specificity
|
yeah totally agree. CLI should be able to generate JSON, but additionally it would be nice to also render a report in html format, right? I'd like to have it in our build process right before deploy to production and prefer to have a nice report page. :) So maybe a flag would be nice to render report additionally to JSON output? |
Yup, so no more Google Chart. D3 is overkill and hard to configure, maybe we can try another lib:
+1 |
All right, lots of good ideas here! I think being able to generate (and view) a specificity graph directly from the CLI makes sense, but might be to slow to always do, so perhaps like @stefanjudis said - a For the ideas around rendering a |
I see a couple of use cases: Calling it to see stats immediately to get an idea how it's going ( this is similar to the black example image @dhoko placed above ):
Additionally I'd like to have the option to output the evaluated data somewhere ( JSON including timestamp probably )
But what I'd prefer over everything is also to able to generate an HTML report, so that I can put it into my CI and paste the url into the development chats for everybody to check. :)
|
@paazmaya @stefanjudis This functionality is now available as of |
@pocketjoso nice!!! will hopefully give it a shot soon. Thanks for your work. |
Great, thank you! |
Thank @dhoko, he did most of the work. :) |
Please provide a command line interface which could be used like:
The text was updated successfully, but these errors were encountered: