Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>template-config-generatorNew to Visual Studio Code? Get it now.
template-config-generator

template-config-generator

Meir Asaraf

|
24 installs
| (0) | Free
Generate environment-specific HTML, JS, and CSS files by dynamically replacing placeholders using a config.json file. Maintains original folder structure for multi-environment projects.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🚀 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"
  }
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft