-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
209 lines (209 loc) · 6.8 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
{
"name": "find-test-file",
"displayName": "Find Test File",
"description": "It'll help you jump between source and test file easily.",
"version": "0.3.0",
"license": "MIT",
"engines": {
"vscode": "^1.50.0"
},
"publisher": "wjgogogo",
"icon": "public/icon.png",
"categories": [
"Other"
],
"keywords": [
"frontend",
"vscode extension",
"unit test"
],
"homepage": "https://github.com/wjgogogo/vscode-find-test-file.git",
"repository": {
"url": "https://github.com/wjgogogo/vscode-find-test-file.git",
"type": "git"
},
"bugs": {
"url": "https://github.com/wjgogogo/vscode-find-test-file/issues"
},
"main": "./dist/extension.js",
"activationEvents": [
"onCommand:find-test-file.jumpToTest",
"onCommand:find-test-file.createTestFile"
],
"contributes": {
"commands": [
{
"command": "find-test-file.jumpToTest",
"title": "Jump To Source/Test File",
"category": "Find Test File",
"icon": "$(search-view-icon)",
"enablement": "resourceExtname =~ /.[jt]sx?$/"
},
{
"command": "find-test-file.createTestFile",
"title": "Create Test File For Current",
"category": "Find Test File",
"icon": "$(file-add)",
"enablement": "resourceExtname =~ /.[jt]sx?$/ && config.findTestFile.createIfNotFind.enable == true"
}
],
"keybindings": [
{
"command": "find-test-file.jumpToTest",
"key": "ctrl+shift+t",
"mac": "cmd+shift+t",
"when": "resourceExtname =~ /.[jt]sx?$/"
},
{
"command": "find-test-file.createTestFile",
"key": "ctrl+alt+t",
"mac": "cmd+alt+t",
"when": "resourceExtname =~ /.[jt]sx?$/ && config.findTestFile.createIfNotFind.enable == true"
}
],
"menus": {
"editor/context": [
{
"command": "find-test-file.jumpToTest",
"group": "1_find-test-file",
"when": "resourceExtname =~ /.[jt]sx?$/"
},
{
"command": "find-test-file.createTestFile",
"group": "1_find-test-file",
"when": "resourceExtname =~ /.[jt]sx?$/ && config.findTestFile.createIfNotFind.enable == true"
}
],
"editor/title": [
{
"command": "find-test-file.jumpToTest",
"group": "navigation",
"when": "resourceExtname =~ /.[jt]sx?$/"
},
{
"command": "find-test-file.createTestFile",
"group": "navigation",
"when": "resourceExtname =~ /.[jt]sx?$/ && config.findTestFile.createIfNotFind.enable == true"
}
]
},
"configuration": {
"title": "Find Test File",
"properties": {
"findTestFile.basic.testSuffix": {
"type": "string",
"default": "\\.(spec|test)",
"markdownDescription": "The regexp patterns that extension uses to detect test files. By default, it looks for `.js`, `.jsx`, `.ts`, `.tsx` files with a suffix of `.spec` or `.test` (e.g. `example.spec.ts` or `example.test.js`)."
},
"findTestFile.basic.excludeFolder": {
"type": "array",
"default": [
"node_modules"
],
"items": {
"type": "string"
},
"uniqueItems": true,
"markdownDescription": "The folders are outside of the scan range. By default, it excludes `node_modules`."
},
"findTestFile.createIfNotFind.enable": {
"type": "boolean",
"default": false,
"markdownDescription": "Decide whether to create a test file when it can't be found. By default, it's `false`."
},
"findTestFile.createIfNotFind.insertSnippet": {
"type": "boolean",
"default": true,
"markdownDescription": "Decide whether to insert code snippet. By default, it's `true`."
},
"findTestFile.createIfNotFind.preferStructureMode": {
"type": "string",
"default": "separate",
"enum": [
"separate",
"unite"
],
"markdownEnumDescriptions": [
"Put new test file in a separate folder, and follow the same directory structure of source file (e.g. the test file of `src/example/a.ts` should be `@separate-folder/example/a.spec.ts`).",
"Put new test file close to the source file (e.g. the test file of `src/example/a.ts` should be `src/example/@unite-folder/a.spec.ts`)."
],
"markdownDescription": "The prefer way to create test file when can't find it and `#findTestFile.createIfNotFind.enable#` is enabled. By default, it's `separate`."
},
"findTestFile.createIfNotFind.preferTestDirectory": {
"type": "object",
"default": {
"separate": "__tests__",
"unite": "__tests__"
},
"properties": {
"separate": {
"type": "string"
},
"unite": {
"type": "string"
}
},
"required": [
"separate",
"unite"
],
"additionalProperties": false,
"markdownDescription": "Determine the test folder structure when create test file. `separate` property only enable when `#findTestFile.createIfNotFind.preferStructureMode#` is `separate`. `unite` property is likewise. By default, they're both `__tests__`. And support multi-level directories (e.g. `__tests__/unit`)."
}
}
}
},
"scripts": {
"compile": "rm -rf dist && tsc -p ./",
"watch": "tsc -watch -p ./",
"lint": "eslint src --ext ts",
"format": "prettier src --write",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md",
"version": "yarn run changelog",
"postversion": "git push && git push --tags",
"prepublish": "vsce package",
"publish": "vsce publish"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"lint-staged": {
"*.ts": [
"eslint --fix",
"prettier --write",
"git add"
],
"*.{json,md}": [
"prettier --write",
"git add"
]
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"devDependencies": {
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@types/node": "14.x",
"@types/string-similarity": "^4.0.0",
"@types/vscode": "^1.50.0",
"@typescript-eslint/eslint-plugin": "^4.26.0",
"@typescript-eslint/parser": "^4.26.0",
"conventional-changelog-cli": "^2.1.1",
"eslint": "^7.27.0",
"husky": "^4.3.8",
"lint-staged": "^11.0.0",
"prettier": "^2.3.1",
"typescript": "^4.3.2",
"vsce": "^1.93.0"
},
"dependencies": {
"randexp": "^0.5.3",
"string-similarity": "^4.0.4"
}
}