CDN Dependency Manager is a standalone Python script designed to scan your project directory files and list all CDN dependencies used. It generates a packages.json
file similar to a Node.js project and queries common CDN APIs to fetch the latest versions of these packages. Users can easily update the CDN versions in their project files by clicking the patch button.
- Scans CDN dependencies in *.html, *.js, *.jsx, *.vue, *.php, and *.py files.
- Generates a
packages.json
file with the listed dependencies. - Fetches the latest versions of CDN packages from common APIs.
- Allows users to patch CDN versions with a simple click.
CDNs Supported:
- Install Python 3.xx if you haven't already.
- Download the script and place it in the root directory of your project.
- Run the script:
python '# CDN Dependency Manager (Standalone).py'
- The script will check each file in your project directory to list the CDN dependencies used in each file. It will request the CDN APIs to get the latest versions of the packages and compare them to the used CDN package versions. It will then generate a
packages.json
file. - Review the listed CDN dependencies and their versions in a table.
- Click the patch button to update the CDN versions in your project files.
Patch only one project file CDN version
Patch all project files CDN versions
{
"dependencies": {
"index.html": [
{
"name": "bootstrap",
"version": "5.3.3",
"new": "5.3.3",
"file": "bootstrap.min.css",
"cdn": "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css",
"source": "cdnjs.cloudflare.com"
},
{
"name": "bootstrap",
"version": "5.2.3",
"new": "5.3.3",
"file": "bootstrap.min.js",
"cdn": "https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js",
"source": "cdn.jsdelivr.net"
}
],
"templates\\app.html": [
{
"name": "axios",
"version": "1.7.7",
"new": "1.7.7",
"file": "axios.min.js",
"cdn": "https://cdnjs.cloudflare.com/ajax/libs/axios/1.7.7/axios.min.js",
"source": "cdnjs.cloudflare.com"
}
]
}
}
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or suggestions, please open an issue.