🚀 Template Generator - VS Code Extension
Easily generate environment-specific HTML, JS, and CSS templates for your projects!
📖 Overview
The Template Generator extension automates the process of dynamically replacing placeholders in .html, .js, and .css files using a configuration file (config.json).
This is ideal for multi-environment projects, allowing developers to quickly generate files for development, staging, and production without manually editing files.
✨ Features
✅ Environment-Based File Generation – Quickly generate files for local, staging, or production.
✅ Supports .html, .js, and .css – Dynamically replaces placeholders in these files.
✅ Preserves Folder Structure – Maintains the original project structure inside environments/{{selected_env}}/.
✅ Ignores Unwanted Folders – Automatically skips .git, .vscode, and environments/ directories.
✅ One-Click Generation – Select an environment, and the extension does the rest!
📌 How to Use
1️⃣ Add a config.json File
Define your environment variables inside a config.json file in the project root.
{
"local": {
"BASE_URL": "http://localhost:3000",
"API_URL": "http://localhost:5000/api"
},
"staging": {
"BASE_URL": "https://staging.mywebsite.com",
"API_URL": "https://staging.api.mywebsite.com"
},
"production": {
"BASE_URL": "https://mywebsite.com",
"API_URL": "https://api.mywebsite.com"
}
}