Handling schematics cli commands via VSCode Graphical User Interface. Inspired by Angular Schematics.
Schematics Extension is based on Schematics CLI to generate boilerplate code and file, so you can use it without angular project and node_modules to generate any code boilerplate in any place.
Setting node_modules schematics projectname or your schematics project path in vscode settings.
code
->preference
-> settings
-> user
-> extensions
-> Schematics Extension
Settings for node_modules can only use your schematics at nodejs project or other project with node_modules.
NOTICE: If you want to use schematics in your node_modules, make sure you also link you schematics to your node_modules(try to use
npm link
command), or just install published schematics in your node_modules.
You can start use schematics cli via three places:
-
Command Palette: Generate schematic file:
-
open command palette:
-
cmd + shift + p
-
select
schematics extension: execute via command palette
-
-
Files Explorer menu:
-
Schematics' Treeview
Property Schema | prompt type |
---|---|
"type": "boolean" | confirmation ("yes"=true, "no"=false) |
"type": "string" | input |
"type": "number" | input (only valid numbers accepted) |
"type": "integer" | input (only valid integer accepted) |
"enum": [...] | list (enum members become list selections) |
X-prompt Property | prompt type |
---|---|
"type": "comfirmation" | confirmation ("yes"=true, "no"=false) |
"type": "input" | input(Textual input; ideal for string or number options.) |
"type": "list" | list(A predefined set of allowed values.) |
Schematics Extension requires Visual Studio Code version >= 1.39.
install your schematics cli first.
npm i -g schematics
Schematics Extension will be auto actived when entering languages files as follow:
- typescript
- javascript
- java
- dart
- python
- golang
- kotlin
- swift
- csharp
If your extension is not actived, you can manual trigger it by lanunching our custom command in palatte
such as :
schematics extension: execute schematics
or by right-clicking your file under explorer then select our custom command item.
support more schema.json's properties type.
- properties type: enum/number/integer.
- x-prompt type: confirmation/input
Hello World Schematics Extension!