Use bikeshare to get around? Make sure there are always docks where you’re going, and bikes when you’re leaving, with
About a week ago, I added a simple script to my environment to make it easier to purge Cloudflare caches. Read more about it here.
But it was a wee bit too simple: I didn’t want to check my API keys into any repo, and I also didn’t want to keep it lying around so I could pass it in as an option.
I improved the script to make it so you can easily store your config locally. Now, your API key, email, and site-or-zone can be stored locally as:
- Environment variables
- Flags (as before)
- In a
Cloudfileat the root of your project
And the site name can be stored in a
CNAME file, which is already required for Github pages sites with custom domains.
Check it out on Github!
Right now its functionality is limited to fetching your site’s zone and purging the cache. Feel free to fork it and make it better!