-
Notifications
You must be signed in to change notification settings - Fork 32
/
package.json
371 lines (371 loc) · 12.1 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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
{
"name": "vscode-fast-folder-structure",
"displayName": "Folder Templates",
"description": "Create Templates for Folders and Files for easy reusability",
"repository": {
"type": "git",
"url": "https://github.com/Huuums/vscode-folder-templates"
},
"keywords": [
"Folder Creator",
"File templates",
"Folder Templates",
"template",
"Create Directories",
"Productivity",
"scaffold",
"react",
"angular",
"vue"
],
"icon": "images/extension-icon.png",
"version": "3.12.1",
"publisher": "Huuums",
"engines": {
"vscode": "^1.87.0"
},
"license": "MIT",
"categories": [
"Other"
],
"activationEvents": [
"onFileSystem:.ftsettings.json"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "FT.createFolderStructure",
"title": "Create New Templated Folder"
},
{
"command": "FT.openGlobalFolder",
"title": "Open Global Folder Templates Directory"
},
{
"command": "FT.chooseCustomGlobalTemplateFolder",
"title": "Set Custom Global Folder Templates Directory"
}
],
"menus": {
"explorer/context": [
{
"when": "explorerResourceIsFolder",
"command": "FT.createFolderStructure",
"group": "2_workspace@500"
}
]
},
"configuration": {
"title": "Folder Templates",
"properties": {
"folderTemplates.templateNotation": {
"type": "object",
"scope": "window",
"default": {
"start": [
"<",
"["
],
"end": [
">",
"]"
]
},
"description": "Can be used to customize the template notation",
"properties": {
"start": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"default": "",
"minLength": 1,
"pattern": "^([^\\s].*[^\\s]*)$"
},
"default": [
"<",
"["
]
},
"end": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"default": "",
"minLength": 1,
"pattern": "^([^\\s].*[^\\s]*)$"
},
"default": [
"<",
"["
]
}
}
},
"folderTemplates.templateFolderPath": {
"type": "string",
"scope": "window",
"default": ".fttemplates",
"description": "Defines the path to the templates folder inside a project. Always has to be a relative path to the project root"
},
"folderTemplates.structures": {
"type": "array",
"scope": "window",
"default": [],
"description": "An array of objects where one object equals one natural file system folder structure.",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"default": "",
"minLength": 1,
"pattern": "^([^\\s].*[^\\s]*)$"
},
"customVariables": {
"type": "array",
"description": "Custom variables that will be replaced upon folder creation",
"uniqueItems": true,
"items": {
"type": "string",
"examples": [
"mainColor=>red",
"secondaryColor=>#cecece",
"tertiaryColor"
],
"description": "A key-value pair (kvp) declaration delimited by '=>'. The left hand side is the name of the variable and the right hand side is the value to replace it",
"pattern": "^[\\w]+(=>([^\\s])+)?$"
}
},
"omitParentDirectory": {
"type": "boolean",
"default": false,
"description": "If set to true FT will create all files directly inside the current folder instead of creating a new folder and all the files inside of it"
},
"setExecutablePermission": {
"type": "boolean",
"default": false,
"description": "If set to true FT will set automatically set executable permissions for files that are executable in the template as well."
},
"omitFTName": {
"type": "boolean",
"default": false,
"description": "If set to true FT will not ask for a component name. (Can only be set to true if omitParentDirectory is true as well)"
},
"overwriteExistingFiles": {
"type": "string",
"default": "never",
"enum": [
"never",
"always",
"prompt"
],
"description": "If set to always all existing files will be overwritten. If set to prompt user will be asked which files shall be overwritten upon foldercreation. "
},
"openFilesWhenDone": {
"type": "array",
"description": "Files to open after the folder template is created",
"uniqueItems": true,
"items": {
"type": "string",
"default": "",
"minLength": 1,
"pattern": "^([^\\s].*[^\\s]*)$"
}
},
"absolutePath": {
"type": "boolean",
"default": false,
"description": "If set to true FT will always create all files relative to project root rather than relative to the folder you clicked. (Can only be set to true if omitParentDirectory is true as well)"
},
"structure": {
"type": "array",
"description": "Every object in this array represents a file or folder that will be created. To create an empty directory, set the `template` property to `EmptyDirectory`",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"fileName"
],
"properties": {
"fileName": {
"type": "string",
"default": "",
"minLength": 1,
"pattern": "^([^\\s].*[^\\s]*)$",
"description": "Filenames can contain interpolated custom variables or can be assigned to subfolders by typing the full path. If a subfolder does not exist in the full path provided, it will be created at runtime",
"examples": [
"<FTName>.jsx",
"root/subfolderA/subfolderB/test.js",
"<CustomVar>"
]
},
"isExecutable": {
"type": "boolean",
"default": false,
"description": "If set to true FT will set executable permissions for this file"
},
"template": {
"description": "",
"anyOf": [
{
"const": "EmptyDirectory"
},
{
"type": "string",
"default": "",
"minLength": 1,
"pattern": "^([^\\s].*[^\\s]*)$"
}
],
"examples": [
"Typescript Functional Component",
"IndexFile",
"EmptyDirectory"
]
}
}
}
}
},
"if": {
"properties": {
"omitParentDirectory": {
"const": true
}
}
},
"then": {
"properties": {
"omitFTName": {
"enum": [
true,
false
]
},
"absolutePath": {
"enum": [
true,
false
]
}
}
},
"else": {
"properties": {
"omitFTName": {
"enum": [
false
]
},
"absolutePath": {
"enum": [
false
]
}
}
}
}
},
"folderTemplates.fileTemplates": {
"type": "object",
"scope": "window",
"default": {},
"examples": [
"\"Indexfile\": \"import <FTName> from './<FTName>'\n\nexport default <FTName>;"
],
"additionalProperties": false,
"patternProperties": {
"^.+$": {
"anyOf": [
{
"type": "string",
"default": "",
"minLength": 1,
"pattern": "^([^\\s].*[^\\s]*)$"
},
{
"type": "array",
"items": {
"type": "string",
"default": ""
}
}
]
}
}
},
"folderTemplates.globalTemplateDirectoryPath": {
"type": "string",
"scope": "window",
"default": "",
"examples": [
"C:\\Users\\MyUser\\Desktop\\globalTemplates",
"D:\\Users\\MyUser\\Desktop\\coding\\myGlobalTemplates",
"%HOME%\\Desktop\\code\\GlobalTemplates"
],
"description": "Defines the path to the global templates folder. Has to be an absolute path to the directory containing the templates"
}
}
},
"jsonValidation": [
{
"fileMatch": ".ftsettings.json",
"url": "./schemas/ftsettings.json"
}
]
},
"scripts": {
"vscode:prepublish": "yarn rimraf-out && yarn esbuild-base --minify",
"rimraf-out": "rimraf ./out",
"esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node",
"esbuild": "npm run esbuild-base -- --sourcemap",
"esbuild-watch": "npm run esbuild-base -- --sourcemap --watch",
"compile": "tsc -p ./",
"lint": "eslint \"src/**/*.ts\"",
"watch": "tsc -watch -p ./",
"pretest": "npm run compile",
"test": "node ./out/test/runTest.js"
},
"devDependencies": {
"@types/chai": "^4.3.12",
"@types/chai-fs": "^2.0.5",
"@types/html-tags": "^3.0.1",
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.24",
"@types/pluralize": "^0.0.33",
"@types/rimraf": "^4.0.5",
"@types/sinon": "^17.0.3",
"@types/sinon-chai": "^3.2.12",
"@types/vscode": "^1.87.0",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"@vscode/test-cli": "^0.0.6",
"@vscode/test-electron": "^2.3.9",
"all-contributors-cli": "^6.26.1",
"chai": "4",
"chai-fs": "^2.0.0",
"esbuild": "^0.20.1",
"eslint": "^8.43.0",
"glob": "^10.3.10",
"mocha": "^10.3.0",
"rimraf": "^5.0.5",
"sinon": "^17.0.1",
"sinon-chai": "^3.7.0",
"typescript": "^5.3.3",
"vscode-test": "^1.0.2"
},
"dependencies": {
"change-case": "4",
"date-fns": "^2",
"date-fns-tz": "^2.0.0",
"html-tags": "^3.3.1",
"minimatch": "^9.0.3",
"open": "^8.4.0",
"pluralize": "^8.0.0",
"x-match-expression": "^0.2.1"
}
}