You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add configurable file name and content for new package
Introduces extension settings to customize the file name and default content when creating a new package. The command now uses these settings, supporting template variables for file content, and updates the keybinding condition for better context sensitivity.
Copy file name to clipboardExpand all lines: package.json
+18-1Lines changed: 18 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,23 @@
17
17
"package": "npm run build && vsce package"
18
18
},
19
19
"contributes": {
20
+
"configuration": {
21
+
"title": "New Package Extension Settings",
22
+
"properties": {
23
+
"newPackage.fileContent": {
24
+
"type": "string",
25
+
"default": "export {};",
26
+
"markdownDescription": "Default content for the created file.\nSupported variables:\n- `${fileName}` - The file name\n- `${packageName}` - The package name",
27
+
"scope": "resource",
28
+
"editPresentation": "multilineText"
29
+
},
30
+
"newPackage.fileName": {
31
+
"type": "string",
32
+
"default": "index.ts",
33
+
"description": "File name for the main file created in the new package folder."
0 commit comments