vscode kunlun
improve development efficiency through custom template
Usages
Configuration
[
{
"label": "label1",
"description": "new file",
"files": [
{
"file": "index.tsx"
},
{
"file": "index.scss"
}
]
},
{
"label": "label2",
"description": "new folder",
"files": [
{
"file": "example/index.tsx"
},
{
"file": "example/index.scss"
}
]
},
{
"label": "label3",
"description": "new folder use variable",
"vars": [
{
"placeholder": "please enter the module name",
"name": "modulename"
}
],
"files": [
{
"file": "{{modulename}}/index.tsx"
},
{
"file": "{{modulename}}/index.scss"
}
]
},
{
"label": "label4",
"description": "new folder use template",
"vars": [
{
"placeholder": "please enter the module name",
"name": "modulename"
}
],
"files": [
{
"file": "{{modulename}}/index.tsx",
"template": "// {{modulename}}/index.tsx\nconsole.log('hello word')\n"
},
{
"file": "{{modulename}}/index.scss"
}
]
},
{
"label": "label4",
"description": "new folder use template file",
"vars": [
{
"placeholder": "please enter the module name",
"name": "modulename"
}
],
"files": [
{
"file": "{{modulename}}/index.tsx",
"template": "// {{modulename}}/index.tsx\nconsole.log('hello word')\n"
},
{
"file": "{{modulename}}/index.scss",
"templateFile": "path/.../*.temp"
}
]
}
]
Best practices
.kl
|____templates
| |____index.config.temp
| |____component.tsx.temp
| |____model.temp
| |____index.less.temp
| |____index.tsx.temp
|____index2.json
|____index.json