create-item-by-template

This extension can help you quickly create a folder using a template
Right click to create :

Command to create :

Commands
cmd + shift + p
- Create: Create item by template
- Create: Edit template (Global)
- Create: Edit template (Workspace)}
Edit template
You can edit template at global
and workspace
example:
module.exports = {
'web-project': (name, config) => {
// If you input path: ppp/xx-xxx?type=1
// You will get arguments: (xx-xxx,{type:'1'})
const { type } = config
return {
[`${name}.html`]: [
`<!DOCTYPE html>`,
`<html lang="en">`,
`<head>`,
` <meta name="viewport" content="width=device-width, initial-scale=1.0">`,
` <meta http-equiv="X-UA-Compatible" content="ie=edge">`,
` <script src="./${name}.js"></script>`,
` <title>${name}</title>`,
`</head>`,
`<body>`,
` ${type ? 'type ' + type : ''}`,
`</body>`,
`</html>`,
],
[`${name}.js`]: [
`console.log('${name} ok')`,
]
}
},
}
欢迎使用中文反馈建议及问题 https://github.com/lanten/create-by-template/issues