0.0.3 • Published 5 years ago
share-snippets-demo v0.0.3
share-snippets-demo
VS Code插件Share Snippets 支持的代码片段示例npm package
VS Code Plugin Share Snippets Support code snippets demo npm package
目录 category
.
├── README.md
├── package.json
├── share_snippets
│ ├── comment # 注释相关
│ │ └── comment.code-snippets
│ ├── components # 组件相关
│ │ ├── comonent.code-snippets
│ │ └── myButton.share-snippets
│ ├── js # js相关
│ │ └── js.code-snippets
│ └── vue # vue相关
│ └── vue.code-snippets
├── test # 测试自定义片段的文件
│ └── test.vue
└── transferFileToSnippetBody.js # 功能函数Snippets规则,如何编写
Snippets rules, how to write
本仓库中的 Snippets
Snippets in this project
share_snippets目录中的内容
| prefix | scope | comment |
|---|---|---|
| author | javascript,typescript,vue | author info |
| ctdl | javascript,typescript,vue,jsx | TODO Comment Line |
| ctdb | javascript,typescript,vue,jsx | TODO Comment Block |
| vcapi | javascript,typescript,vue,jsx | Vue Component-api template |
| ctdb | vue | Array Fill |
如何快速生成snippet中的body的内容
How quickly generate the content of body in snippet
TIPS:需要安装Node
TIPS: Need install Node
使用提供的transferFileToSnippetBody.js文件
Use the provided
transferFileToSnippetBody.jsfilenode transferFileToSnippetBody.js filename1 filename2 filename3 ...
快速将指定的文件中的内容转成 [context]的形式
Quickly convert the contents of the specified file into the form of
[context]demo:node transferFileToSnippetBody.js test.vue会在当前目录下生成
test.vue.json文件里面的内容即可直接粘贴到.code-snippets文件的body属性中The content in the
test.vue.jsonfile generated in the current directory can be directly pasted into thebodyattribute of the.code-snippetsfile