verbose / readme-badges

Readme badge templates.
MIT License
5 stars 10 forks source link

Sauce Labs Browser Matrix Status Image #7

Open mightyiam opened 9 years ago

mightyiam commented 9 years ago

Very widely used. https://docs.saucelabs.com/reference/status-images/#adding-the-browser-matrix-widget

mightyiam commented 9 years ago

I don't think of any surefire way of getting the Sauce username from the environment.

jonschlinkert commented 9 years ago

Hmm, one thing I've been considering is providing a simple way to set default config variable that can be reused on projects and/or overridden whenever you want.

should be as simple as

verb --sauce=foo

then

verb --get sauce
//=> foo

remove

verb --delete sauce

etc. thoughts? would this be useful?

mightyiam commented 9 years ago

In this case I would look for process.env.SAUCE_USERNAME.

In second thought, it should be correct in sane cases.

mightyiam commented 9 years ago

But, what if it doesn't exist? Then, I would allow for passing of an argument to the template. I don't know how that is done.

mightyiam commented 9 years ago

I like the configuration API example. Not sure what the storage format should be.

doowb commented 9 years ago

I like the configuration API too. Maybe instead of doing --sauce=foo to set a value have a tag for setting like the one for getting and deleting:

verb --set sauce=foo

Then you know not to attempt to run the rest of verb.

@mightyiam I think @jonschlinkert is already storing properties for some things (at least we've talked about it before). I had thought that making a helper to collect this information if it's not already set would be nice, but it wouldn't work with the current setup for loading badges. It would require adding the helper as a separate step to each project. I like the configuration because it can work like git and have global and local repo configuration. (so maybe the commands need to be --get-global for global properties.

@jonschlinkert maybe this should be moved to verb for discussion?