πŸ”— [MIRROR] A Sublime Text 3+ plugin to check for CDN updates in your Web sources https://git.io/CDNUpdates
Go to file
Samuel FORESTIER 1caa9ff6a7 [CI] Bumps `actions/checkout` and `actions/setup-python` to v3 2022-04-23 12:20:09 +02:00
.github/workflows [CI] Bumps `actions/checkout` and `actions/setup-python` to v3 2022-04-23 12:20:09 +02:00
Commands Cleans the project root by settings ST's stuffs in subdirectories 2020-02-28 21:49:21 +01:00
Icons Reworks gutter icons (now compatible for Retina) [thanks to @naernon] 2017-12-27 19:21:07 -05:00
Keymaps Cleans up the key-binding stuff and the Settings edition πŸ‘Œ 2017-12-22 16:36:47 -05:00
Menus Improves style consistency of our `*.sublime-*` files 2021-10-16 09:00:32 +02:00
Settings Improves style consistency of our `*.sublime-*` files 2021-10-16 09:00:32 +02:00
tests Regular test cases updates (as of April 2022) 2022-04-23 12:19:50 +02:00
.gitattributes Makes HTML test page not being detected by GitHub's Linguist 2020-10-10 18:34:20 +02:00
.gitignore Updates .gitignore file 2020-02-28 21:28:37 +01:00
CDNCheckForCDNProviders.py Minor code cleanup and styles 2020-06-23 11:27:52 +02:00
CDNCheckForLinks.py Fixes a regression introduced in v1.2.0, details : 2020-06-23 13:00:09 +02:00
CDNCheckForUpdates.py Minor optimizations for static iterables 2020-06-23 13:09:19 +02:00
CDNConstants.py Fixes a regression introduced in v1.2.0, details : 2020-06-23 13:00:09 +02:00
CDNContent.py Adds Pylint linting to a proper CI pipeline running on GitHub's Actions 2020-11-05 21:28:57 +01:00
CDNUpdates.py Minor code cleanup and styles 2020-06-23 11:27:52 +02:00
CDNUtils.py Let's use a real constants module to facilitate external contributions 2019-05-11 14:43:58 +02:00
LICENSE Initial commit 2017-12-20 19:18:23 +00:00
README.md Explicits Sublime Text 4 support 2021-06-04 23:38:28 +02:00

README.md

CDNUpdates

A Sublime Text 3+ plugin to check for CDN updates in your Web sources

Preview

Introduction

Tired of manually checking if your CDN (Content Delivery Network) are up to date in your web pages ? Yeah, so was I... πŸ˜•

Below is a sum-up of what this Sublime Text 3+ plugin does (well) to help you deal about this :

  1. Gathers links present in your current sheet
  2. Compares them to a list containing known public CDN providers
  3. Figures out a way (with providers' API or with GitHub one) to retrieve the latest "version" of each resource, and compares it with the one you are currently using
  4. Displays some icons in the gutter, to inform you of the results
  5. Displays a Phantom object with the latest version available you should be using
  6. Bonus : Shows up a warning for resources not loaded over HTTPS πŸ‘

Of course, when this plugin does not use the API of the CDN provider, it may inform you of a newer published version, possibly not available from your provider (maybe it's time to opt out from this privacy mess ? πŸ˜‰).

Installation

With Package Control

  1. Open your command palette and type in : Package Control: Install Package
  2. Browse the list or search for CDNUpdates
  3. Press Enter and you're done !

Package Control dedicated page here.

Manually

  1. Move into Sublime Text packages folder (usually $HOME/.config/sublime-text-3/Packages/ or %AppData%\Sublime Text 3\Packages\)
  2. Clone this repository there : $ git clone https://github.com/HorlogeSkynet/CDNUpdates.git
  3. Restart Sublime Text and... πŸŽ‰

Usage

  • Open your command palette and type in : CDNUpdates

  • Right click on your file : CDNUpdates > ...

  • Tools > Packages > CDNUpdates > ...

Settings

Most of the CDN providers don't provide any API for their service, so it would be very tricky to retrieve latest version available directly from them.
Unless for https://cdnjs.com/, this plugin is actually based on the GitHub API to fetch the latest existing Git tag directly from the repositories. Its name is compared afterwards with the CDN version present in your sources.
If you have many many CDNs in your sheets (or if you want to contribute to this project 😜), you'll surely need to set a GitHub API token to avoid being blocked by the rate limit.
You can generate one here (public_repo scope), and paste in under the plugin preferences (accessible from CDNUpdates's Sublime menu).

CDN Providers currently handled

Frequently Asked Questions

How do I get rid of your horrible icons in the gutter ?

It'll be done automatically next time you'll save your sheet πŸ˜‰

Same as above πŸ˜„

Can I add another (or my own) CDN ?

Of course you can, unless the Open Source aspect of this project would be useless 😨
You basically just have to tweak CDNContent.py and imitate what is done there for your provider.
Don't forget to share your work with the world ! 🌍
Or... you can just open an issue here and I'll do my best to handle your case !