Module Structure Generator VS Code Extension
Generate module folders with a predefined structure from a .module-structure.yaml (or .yml ) file.
Features
- Reads
.module-structure.yaml (YAML only) from workspace root
- Adds a
Create Module command
- Prompts for module name and scaffolds folders/files
- Supports
{name} placeholder in file/folder names and contents
- Always reads the latest YAML file (no cache)
- Warns if legacy
.module-structure or .json files are found
Usage
- Add a
.module-structure.yaml file to your workspace root (see below).
- Run
Create Module (from .module-structure) from the Command Palette or right-click in the Explorer.
- Enter your module name. The structure will be generated in the selected folder.
Example .module-structure.yaml
moduleName: "{name}"
folders:
- components
- hooks
- services
- types
files:
- name: index.ts
content: "export * from './{name}.module';"
- name: "{name}.module.ts"
content: "/* Module entry for {name} */"
Migration Note
- Only
.module-structure.yaml or .module-structure.yml is supported.
- If you have an old
.module-structure or .module-structure.json , rename it to .module-structure.yaml .
- The extension will warn you if legacy files are found.
Requirements
- VS Code 1.80+
- Node.js 16+
Extension Settings
- (Planned) Custom default parent folder
- (Planned) Multiple templates
License
MIT
| |