0.0.3 • Published 4 years ago

share-snippets-demo v0.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

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目录中的内容

prefixscopecomment
authorjavascript,typescript,vueauthor info
ctdljavascript,typescript,vue,jsxTODO Comment Line
ctdbjavascript,typescript,vue,jsxTODO Comment Block
vcapijavascript,typescript,vue,jsxVue Component-api template
ctdbvueArray Fill

如何快速生成snippet中的body的内容

How quickly generate the content of body in snippet

TIPS:需要安装Node

TIPS: Need install Node

使用提供的transferFileToSnippetBody.js文件

Use the provided transferFileToSnippetBody.js file

node 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.json file generated in the current directory can be directly pasted into the body attribute of the .code-snippets file