Skip to content

Commit f12b0c6

Browse files
authored
Initial commit
0 parents  commit f12b0c6

21 files changed

+4218
-0
lines changed

Diff for: .eslintrc

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"extends": [ "@antfu" ],
3+
"rules": {
4+
"semi": "off",
5+
"@typescript-eslint/semi": [ "error", "always" ],
6+
"curly": [ "error", "all" ]
7+
},
8+
"overrides": [
9+
{
10+
"files": [ "**/*.ts" ],
11+
"rules": {
12+
"curly": "error"
13+
}
14+
}
15+
]
16+
}

Diff for: .gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.cache
2+
.DS_Store
3+
.idea
4+
*.log
5+
*.tgz
6+
*.vsix
7+
coverage
8+
dist
9+
lib-cov
10+
logs
11+
node_modules
12+
temp

Diff for: .npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ignore-workspace-root-check=true

Diff for: .vscode/extensions.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"amodio.tsl-problem-matcher"
4+
]
5+
}

Diff for: .vscode/launch.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Extension",
6+
"type": "extensionHost",
7+
"request": "launch",
8+
"runtimeExecutable": "${execPath}",
9+
"args": [
10+
"--extensionDevelopmentPath=${workspaceFolder}"
11+
],
12+
"outFiles": [
13+
"${workspaceFolder}/dist/**/*.js"
14+
],
15+
"preLaunchTask": "npm: dev"
16+
}
17+
]
18+
}

Diff for: .vscode/settings.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"eslint.format.enable": true,
3+
"editor.formatOnSave": true,
4+
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
5+
"editor.formatOnType": true,
6+
"[typescript]": {
7+
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
8+
"editor.formatOnSave": true
9+
},
10+
}

Diff for: .vscode/tasks.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// See https://go.microsoft.com/fwlink/?LinkId=733558
2+
// for the documentation about the tasks.json format
3+
{
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "dev",
9+
"isBackground": true,
10+
"presentation": {
11+
"reveal": "never"
12+
},
13+
"problemMatcher": [
14+
{
15+
"base": "$ts-webpack-watch",
16+
"background": {
17+
"activeOnStart": true,
18+
"beginsPattern": "Build start",
19+
"endsPattern": "Build success"
20+
}
21+
}
22+
],
23+
"group": "build"
24+
}
25+
]
26+
}

Diff for: .vscodeignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
src
2+
node_modules
3+
test
4+
.github
5+
.vscode

Diff for: LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
MIT License
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

Diff for: README.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# VSCode Ext Template
2+
3+
<a href="https://marketplace.visualstudio.com/items?itemName=linghaosu.ext-sample" target="__blank"><img src="https://img.shields.io/visual-studio-marketplace/v/linghaosu.ext-sample.svg?color=eee&amp;label=VS%20Code%20Marketplace&logo=visual-studio-code" alt="Visual Studio Marketplace Version" /></a>
4+
5+
6+
## description
7+
8+
This is a extension sample (template), used for quick setup a project.
9+
10+
## License
11+
12+
[MIT](./LICENSE) License © 2022

Diff for: package.json

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"publisher": "linghaosu",
3+
"author": {
4+
"email": "[email protected]",
5+
"name": "linghao.su"
6+
},
7+
"name": "vscode-ext-sample",
8+
"displayName": "VSCode Template Sample",
9+
"version": "0.0.1",
10+
"packageManager": "[email protected]",
11+
"description": "",
12+
"license": "MIT",
13+
"main": "./dist/index.js",
14+
"repository": {
15+
"type": "git",
16+
"url": "https://github.com/linghaoSu/i18n-auto-replace"
17+
},
18+
"files": [
19+
"dist"
20+
],
21+
"engines": {
22+
"vscode": "^1.68.0"
23+
},
24+
"activationEvents": [
25+
"onStartupFinished"
26+
],
27+
"scripts": {
28+
"dev": "pnpm build --watch",
29+
"pack": "vsce package --no-dependencies",
30+
"lint": "eslint .",
31+
"test": "vitest",
32+
"build": "tsup src/index.ts --external vscode",
33+
"release": "bumpp --commit --push --tag && pnpm publish",
34+
"publish": "vsce publish --no-dependencies",
35+
"typecheck": "tsc --noEmit",
36+
"vscode:prepublish": "pnpm build"
37+
},
38+
"devDependencies": {
39+
"@antfu/eslint-config": "^0.25.1",
40+
"@babel/types": "^7.18.4",
41+
"@types/node": "^17.0.41",
42+
"@types/vscode": "^1.68.0",
43+
"bumpp": "^7.1.1",
44+
"eslint": "^8.17.0",
45+
"esno": "^0.16.3",
46+
"pnpm": "^7.1.9",
47+
"tsup": "^6.1.0",
48+
"rimraf": "^3.0.2",
49+
"typescript": "^4.7.3",
50+
"vite": "^2.9.11",
51+
"vitest": "^0.14.1",
52+
"vsce": "^2.9.1"
53+
},
54+
"contributes": {
55+
"configuration": {
56+
"title": "sample-ext",
57+
"properties": {
58+
"i18n-auto-replace.ext": {
59+
"type": "array",
60+
"default": [
61+
"vue"
62+
],
63+
"description": "这里是一个描述,但这个区域用来描述配置信息,写在 settings 里的,可以设置为枚举类型或是别的,也可以提供默认值"
64+
}
65+
}
66+
},
67+
"commands": [
68+
{
69+
"command": "sample-ext.sample-command",
70+
"title": "注册命令用,可以绑定在快捷键上,可以 cmd+shift+p 后输入选中使用"
71+
}
72+
],
73+
"menus": {
74+
"explorer/context": [
75+
{
76+
"command": "sample-ext.sample-command",
77+
"title": "这里在文件目录的区域注册右键菜单,可以调用上面注册的命令",
78+
"group": "sample-ext"
79+
}
80+
]
81+
}
82+
}
83+
}

0 commit comments

Comments
 (0)