Suggestions to stickers.json file
fmoliveira opened this issue · 4 comments
Hello,
I've searched across all files and didn't find any way to change the stickers.json
file without directly editing it. It wouldn't be bad if the file wasn't placed in the public
folder, which is usually a deploy folder. Plus, when multiple pull requests for adding new stickers are placed, we could have some merge conflicts that can be avoided.
I've got a suggestion that could turn our lives a lot easier when adding new stickers, which is to create a new Gulp plugin to automatically generate the stickers.json
file.
It'd be needed to create one additional file in each stickers folder to add only the name
and website
fields, but it'd be easier and less error prone than typing the file names manually.
For instance, the Docker stickers folder would look like this:
stickers/docker/config.json
stickers/docker/docker-preview.svg
stickers/docker/docker.ai
stickers/docker/docker_h.eps
... (more downloadable files could be added as well)
The file config.json
would be as simple as:
{
"name" : "Docker",
"website" : "http://www.docker.com/"
}
No need to type all the file names. All the file names would be automatically scanned by the Gulp task to generate the deployed stickers.json
file.
The Gulp plugin would follow some rules, which are already used in the repository as a best practice. Gulp would be used to enforce these rules, and they could also be described in the contributing guidelines:
- The preview file must have the same name as its containing folder plus the suffix
-preview
, and extension.svg
. - All downloadable files must be prefixed with its containing folder name (e.g.
docker.ai
,docker_h.eps
, all with the same prefix) and its extension must be a vector file (svg, eps, pdf, ai, cdr, possibly others).
This would be an automation of what is already done today, and it'll also make easier for people to contribute with new stickers.
Big benefit here: It'd avoid conflicts when you've multiple pull requests for new stickers. The only person who would touch the stickers.json
file is the one responsible for deploying the website.
If agreed, I could contribute by developing this Gulp plugin and adding the proper config files for all current stickers. Please let me know if I haven't explained my ideas properly.
What do you think?
Great idea. You can develop this in a PR?
I'm happy to know you've liked the idea!
Surely I can do that. We'll keep in touch until then. 😉
PR submitted #12 . 😃
Closing due to inactivity...