Compare commits
	
		
			282 Commits
		
	
	
		
			67070c82bc
			...
			1.1.126
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| ddca7cc92e | |||
| 12fc16e71f | |||
| d8014e94b8 | |||
| 54d05237ed | |||
| 60037aec07 | |||
| 8378fe9eb1 | |||
| 8acbc35562 | |||
| 30deaa961b | |||
| 0d120cd51d | |||
| 86213539f7 | |||
| 94b921fbe2 | |||
| f62b4b7804 | |||
| be89eda130 | |||
| 79d2d781b0 | |||
| 3619d3375e | |||
| 70a942faee | |||
| 4c3ff7c1bb | |||
| 00e78de6f3 | |||
| 0eba2547cc | |||
| febfec0e36 | |||
| c191899971 | |||
| a87e823a9c | |||
| 5f1232e8b8 | |||
| c5bdfe13fa | |||
| d8f6796249 | |||
| 5610154ff9 | |||
| 669abfb38a | |||
| 124154e4e9 | |||
| 545a9ff9f3 | |||
| 57d5804a33 | |||
| 675c64368a | |||
| b1191ffae5 | |||
| e4ac2ed95f | |||
| d784c1cb79 | |||
| ced70cee93 | |||
| b54472aa93 | |||
| fddc5b7c89 | |||
| 195da823b1 | |||
| 2685146634 | |||
| 39aced4f8e | |||
| 56463f999d | |||
| bfbe69fb14 | |||
| 5c47fc1aae | |||
| a858023e39 | |||
| 1228d53827 | |||
| 3acd8ff2d6 | |||
| a9171987c3 | |||
| 82cab2c498 | |||
| 78921cfa48 | |||
| fd8bdac192 | |||
| 304dcae79d | |||
| 692fe08353 | |||
| ddf00fc06a | |||
| e4ad9d3302 | |||
| f4e75d8079 | |||
| 6e997e5491 | |||
| babb81e49b | |||
| 0e0fa2e798 | |||
| eaab7e68d4 | |||
| a944b6ef33 | |||
| c15bbc9aed | |||
| 08f3a0b590 | |||
| 647f8a22cc | |||
| ee930c9fa3 | |||
| faa37adde2 | |||
| 33ab03fbd6 | |||
| 2a9025302e | |||
| 87e25628fa | |||
| 1009ed5132 | |||
| 95df217bf8 | |||
| b7e1f8bc94 | |||
| f7f35a01df | |||
| bca29b7a23 | |||
| 1b2439a0b6 | |||
| 7e7d40b77f | |||
| 6c3ecc1392 | |||
| 65d34bffe3 | |||
| 1aecf03aac | |||
| 71fb6fed1a | |||
| 8120e3bd48 | |||
| 8abd2402ac | |||
| ce631f12af | |||
| 226687cd73 | |||
| c6def3842f | |||
| c562a275c6 | |||
| 9e567d0548 | |||
| eb36ac50fd | |||
| f4f13753f3 | |||
| b1e1f3f5d1 | |||
| 3e1b3131d6 | |||
| e1d10a022c | |||
| 992147f5e6 | |||
| 74f2ce8b81 | |||
| 7a76e7054a | |||
| 4cb55cc417 | |||
| 275c9880e0 | |||
| cd6b6b7add | |||
| 054edd5c22 | |||
| 6894260a83 | |||
| 1d33f89196 | |||
| 532beb7d21 | |||
| 4f16929836 | |||
| 554a26b301 | |||
| fcb0823bed | |||
| f8b6fcf508 | |||
| 0ca8e60d3d | |||
| ee42a03882 | |||
| 635fc85b2e | |||
| cef8ee4578 | |||
| 5e7ad92690 | |||
| 3ee069b6fc | |||
| 29d2eeeeaf | |||
| 52ea415139 | |||
| 4bdd76960b | |||
| 6c3542795e | |||
| d30cdb608e | |||
| d581829a2d | |||
| 7c33cc83d6 | |||
| d886159234 | |||
| 4e708c4ec8 | |||
| 6e8e030a5d | |||
| 0665f8ed09 | |||
| f62175f73f | |||
| 84522247b3 | |||
| 5265de2598 | |||
| 78e4a2df68 | |||
| 16e1557d44 | |||
| e4c0ce6ef3 | |||
| b4fa440dea | |||
| 0a2f3213c4 | |||
| d47d36cde6 | |||
| 1d1e51c134 | |||
| 5eb1f577bb | |||
| 4d7e333604 | |||
| cb1d29fbe8 | |||
| 41f44c06c0 | |||
| b28b27b187 | |||
| 559c8d6574 | |||
| 2aa4c57ae7 | |||
| f0771e1003 | |||
| 239e6c6a65 | |||
| 64d4e014a1 | |||
| a9eab4ab5e | |||
| a62b9eadde | |||
| ca8646527c | |||
| f662462072 | |||
| 30cbe757d3 | |||
| 39a5ab8ff9 | |||
| 0777c9eb99 | |||
| 7a4b225934 | |||
| 479452b271 | |||
| 2fb00d6eeb | |||
| 02362ade1e | |||
| 249b972406 | |||
| 81a9321531 | |||
| cf6e1d2e62 | |||
| 5f5cfd26db | |||
| 60ed9c664b | |||
| 190287cd72 | |||
| e443cda701 | |||
| 8ec77904db | |||
| e2227f3a6c | |||
| 84fb11cf4a | |||
| 3eb7ab4cd4 | |||
| 0e8d39f0c1 | |||
| 559223da39 | |||
| 5d6b14acc7 | |||
| 58e1b1d9c3 | |||
| 32bfc62714 | |||
| bf09ddbac0 | |||
| 59261999f0 | |||
| 663b1cb364 | |||
| aa9bba4755 | |||
| f55c48eb4e | |||
| 1cddb4d88a | |||
| 944b7368d0 | |||
| 295745ed3b | |||
| 16c19e915c | |||
| 7a74aeac9a | |||
| 47da521a15 | |||
| 2f300a0ab6 | |||
| 7aa4310359 | |||
| 51d6bed019 | |||
| 92f922ff93 | |||
| 82025b9624 | |||
| 014ef099f2 | |||
| febc36ef36 | |||
| 9a7217cbb6 | |||
| 64c8d8d77e | |||
| 7bebd66b20 | |||
| 7d8e82a7de | |||
| 89c1150c7d | |||
| 65a1db8157 | |||
| c7bb134cff | |||
| 640ba2fbf5 | |||
| c21ddcdd2e | |||
| 910c941222 | |||
| 6d6c56b87c | |||
| 96f27dadd7 | |||
| 0a380910dc | |||
| 98ab84e21f | |||
| 4cd0e6a1e3 | |||
| 27ef2b1e7f | |||
| 6b46502e81 | |||
| cc8a946cd6 | |||
| 7580bcb90a | |||
| 07e384f98d | |||
| 5765b0e00b | |||
| f6a8250db8 | |||
| b94da7e56c | |||
| b89a824004 | |||
| b7845de2cb | |||
| 2f7b7645e3 | |||
| 6f4502389e | |||
| 636e769e56 | |||
| d239610e81 | |||
| e82de8da2a | |||
| 5232607549 | |||
| 1bacb3f46d | |||
| 6bf71399a3 | |||
| 4951107d89 | |||
| 5581e178a5 | |||
| d688b9d34a | |||
| dfe13b5ad5 | |||
| eded025bd5 | |||
| 04ae797578 | |||
| e38cf200b9 | |||
| 51d0d54771 | |||
| 664740860b | |||
| 8440fd8275 | |||
| 084e4239b4 | |||
| 9f0c85e8d3 | |||
| 66ea0ee96d | |||
| 5489463885 | |||
| cf1eca0e5c | |||
| 5a28602203 | |||
| 9b3cd8cbcc | |||
| b7608be252 | |||
| 4235fd7961 | |||
| 2f359da27a | |||
| 8340c1b4f2 | |||
| e17c9bc287 | |||
| 1f31f43497 | |||
| 1c8c95191e | |||
| 497054d911 | |||
| 55ef37fab8 | |||
| e266af9370 | |||
| 4925404e04 | |||
| ea16544636 | |||
| 91b0d32b8a | |||
| bc759c3deb | |||
| a9a886cbc8 | |||
| 5f2724bdd1 | |||
| a767d334a0 | |||
| c315eecc46 | |||
| e0ad27be04 | |||
| 7f480b480f | |||
| cf85a5ad24 | |||
| b78d041c42 | |||
| b07a29c868 | |||
| 5ccb93835d | |||
| 73b9536109 | |||
| b321e19d2d | |||
| 88757a4bb3 | |||
| da188d6c92 | |||
| 0a55a5bbdc | |||
| 74d298bc8a | |||
| e946dfe08a | |||
| 75ca1feeae | |||
| 8458af9ffd | |||
| 342e56b860 | |||
| 4fd01c314f | |||
| e501c0aea1 | |||
| 4afb410e11 | |||
| 1e2148a1bb | |||
| 52bae9f401 | |||
| d131041873 | |||
| 71d54d5e90 | |||
| 6fe024eddd | |||
| 0b619beb75 | |||
| d91474f3da | |||
| d8730da20f | 
							
								
								
									
										22
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
				
			|||||||
 | 
					kind: pipeline
 | 
				
			||||||
 | 
					name: default
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					trigger:
 | 
				
			||||||
 | 
					    event:
 | 
				
			||||||
 | 
					        - tag
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					steps:
 | 
				
			||||||
 | 
					    - name: build
 | 
				
			||||||
 | 
					      image: node
 | 
				
			||||||
 | 
					      commands:
 | 
				
			||||||
 | 
					          - npm install -g vsce
 | 
				
			||||||
 | 
					          - npm ci
 | 
				
			||||||
 | 
					          - vsce package
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: gitea_release
 | 
				
			||||||
 | 
					      image: plugins/gitea-release
 | 
				
			||||||
 | 
					      settings:
 | 
				
			||||||
 | 
					          base_url: https://gitea.raphaelpiccolo.com
 | 
				
			||||||
 | 
					          files: ./*.vsix
 | 
				
			||||||
 | 
					          api_key:
 | 
				
			||||||
 | 
					              from_secret: gitea_token
 | 
				
			||||||
							
								
								
									
										28
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										28
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -3,3 +3,31 @@ dist
 | 
				
			|||||||
node_modules
 | 
					node_modules
 | 
				
			||||||
.vscode-test/
 | 
					.vscode-test/
 | 
				
			||||||
*.vsix
 | 
					*.vsix
 | 
				
			||||||
 | 
					/core
 | 
				
			||||||
 | 
					*~
 | 
				
			||||||
 | 
					\#*#
 | 
				
			||||||
 | 
					node_modules/
 | 
				
			||||||
 | 
					log/
 | 
				
			||||||
 | 
					logs/
 | 
				
			||||||
 | 
					*.log
 | 
				
			||||||
 | 
					npm-debug.log*
 | 
				
			||||||
 | 
					yarn-debug.log*
 | 
				
			||||||
 | 
					yarn-error.log*
 | 
				
			||||||
 | 
					.env*
 | 
				
			||||||
 | 
					Thumbs.db
 | 
				
			||||||
 | 
					.DS_Store
 | 
				
			||||||
 | 
					.npm
 | 
				
			||||||
 | 
					.vscode*
 | 
				
			||||||
 | 
					*.pem
 | 
				
			||||||
 | 
					*.p12
 | 
				
			||||||
 | 
					*.p8
 | 
				
			||||||
 | 
					*.key
 | 
				
			||||||
 | 
					.vercel
 | 
				
			||||||
 | 
					.composer/
 | 
				
			||||||
 | 
					.php-cs-fixer.cache
 | 
				
			||||||
 | 
					coverage/
 | 
				
			||||||
 | 
					.cache/
 | 
				
			||||||
 | 
					.local/
 | 
				
			||||||
 | 
					.config/
 | 
				
			||||||
 | 
					data/
 | 
				
			||||||
 | 
					.aider*
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,9 +0,0 @@
 | 
				
			|||||||
# Change Log
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
All notable changes to the "vscodestat" extension will be documented in this file.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## [Unreleased]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
- Initial release
 | 
					 | 
				
			||||||
							
								
								
									
										58
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										58
									
								
								README.md
									
									
									
									
									
								
							@@ -9,60 +9,10 @@ it can track :
 | 
				
			|||||||
- file saving
 | 
					- file saving
 | 
				
			||||||
- window focus
 | 
					- window focus
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Requirements
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
nothing particular
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Extension Settings
 | 
					## Extension Settings
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
 | 
					* `vscodestat.setUrl`: function to set the remote server's url
 | 
				
			||||||
 | 
					this will set the variable vscodestat.url
 | 
				
			||||||
 | 
					* `vscodestat.callUrl`: funciton to test if it works
 | 
				
			||||||
 | 
					
 | 
				
			||||||
For example:
 | 
					Sample url : https://xxxxxx/vscodestat?userName=raf
 | 
				
			||||||
 | 
					 | 
				
			||||||
This extension contributes the following settings:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
* `myExtension.enable`: Enable/disable this extension.
 | 
					 | 
				
			||||||
* `myExtension.thing`: Set to `blah` to do something.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Known Issues
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Calling out known issues can help limit users opening duplicate issues against your extension.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Release Notes
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Users appreciate release notes as you update your extension.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
### 1.0.0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Initial release of ...
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
### 1.0.1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Fixed issue #.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
### 1.1.0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Added features X, Y, and Z.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
---
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Following extension guidelines
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
* [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Working with Markdown
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux).
 | 
					 | 
				
			||||||
* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux).
 | 
					 | 
				
			||||||
* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## For more information
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
 | 
					 | 
				
			||||||
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
**Enjoy!**
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2212
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2212
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										34
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								package.json
									
									
									
									
									
								
							@@ -1,7 +1,7 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    "name": "vscodestat",
 | 
					    "name": "vscodestat",
 | 
				
			||||||
    "displayName": "vscodestat",
 | 
					    "displayName": "vscodestat",
 | 
				
			||||||
  "version": "1.0.3",
 | 
					    "version": "1.1.126",
 | 
				
			||||||
    "description": "",
 | 
					    "description": "",
 | 
				
			||||||
    "categories": [
 | 
					    "categories": [
 | 
				
			||||||
        "Other"
 | 
					        "Other"
 | 
				
			||||||
@@ -10,6 +10,8 @@
 | 
				
			|||||||
        "type": "git",
 | 
					        "type": "git",
 | 
				
			||||||
        "url": "ssh://git@gitea.raphaelpiccolo.com:10022/root/vscodestat.git"
 | 
					        "url": "ssh://git@gitea.raphaelpiccolo.com:10022/root/vscodestat.git"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "license": "ISC",
 | 
				
			||||||
 | 
					    "author": "Raphael Piccolo",
 | 
				
			||||||
    "main": "./out/extension.js",
 | 
					    "main": "./out/extension.js",
 | 
				
			||||||
    "scripts": {
 | 
					    "scripts": {
 | 
				
			||||||
        "compile": "tsc -p ./",
 | 
					        "compile": "tsc -p ./",
 | 
				
			||||||
@@ -45,18 +47,26 @@
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "activationEvents": [
 | 
				
			||||||
 | 
					        "onStartupFinished"
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
    "devDependencies": {
 | 
					    "devDependencies": {
 | 
				
			||||||
    "@types/mocha": "^10.0.6",
 | 
					        "@types/mocha": "^10.0.10",
 | 
				
			||||||
    "@types/node": "20.x",
 | 
					        "@types/node": "24.x",
 | 
				
			||||||
    "@types/vscode": "^1.87.0",
 | 
					        "@types/vscode": "^1.105.0",
 | 
				
			||||||
    "@typescript-eslint/eslint-plugin": "^7.5.0",
 | 
					        "@typescript-eslint/eslint-plugin": "^8.46.2",
 | 
				
			||||||
    "@typescript-eslint/parser": "^7.5.0",
 | 
					        "@typescript-eslint/parser": "^8.46.2",
 | 
				
			||||||
    "@vscode/test-cli": "^0.0.9",
 | 
					        "@vscode/test-cli": "^0.0.12",
 | 
				
			||||||
    "@vscode/test-electron": "^2.3.9",
 | 
					        "@vscode/test-electron": "^2.5.2",
 | 
				
			||||||
    "eslint": "^8.57.0",
 | 
					        "eslint": "^9.39.0",
 | 
				
			||||||
    "typescript": "^5.4.3"
 | 
					        "typescript": "^5.9.3"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "engines": {
 | 
					    "engines": {
 | 
				
			||||||
    "vscode": "^1.87.0"
 | 
					        "vscode": "^1.105.0"
 | 
				
			||||||
  }
 | 
					    },
 | 
				
			||||||
 | 
					    "icon": "icon.png",
 | 
				
			||||||
 | 
					    "extensionKind": [
 | 
				
			||||||
 | 
					        "ui",
 | 
				
			||||||
 | 
					        "workspace"
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,7 @@ export function activate(context: vscode.ExtensionContext) {
 | 
				
			|||||||
    let disposable2 = vscode.commands.registerCommand('vscodestat.setUrl', async () => {
 | 
					    let disposable2 = vscode.commands.registerCommand('vscodestat.setUrl', async () => {
 | 
				
			||||||
        const url = await vscode.window.showInputBox({
 | 
					        const url = await vscode.window.showInputBox({
 | 
				
			||||||
            prompt: 'Enter the URL:',
 | 
					            prompt: 'Enter the URL:',
 | 
				
			||||||
            placeHolder: 'https://example.com'
 | 
					            placeHolder: ''
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (url) {
 | 
					        if (url) {
 | 
				
			||||||
@@ -31,6 +31,7 @@ export function activate(context: vscode.ExtensionContext) {
 | 
				
			|||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        await makeHttpRequest({ event: 'ping'});
 | 
					        await makeHttpRequest({ event: 'ping'});
 | 
				
			||||||
 | 
					        vscode.window.showInformationMessage('callUrl done');
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
    context.subscriptions.push(disposable3);
 | 
					    context.subscriptions.push(disposable3);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -69,8 +70,17 @@ export function deactivate() { }
 | 
				
			|||||||
* => monitoringserver
 | 
					* => monitoringserver
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
function extractProjectName(path: string) {
 | 
					function extractProjectName(path: string) {
 | 
				
			||||||
    const match = path.match(/\/root\/(docker|projects)\/([^/]+)/);
 | 
					    // des c'est l'un des fois l'autre ?
 | 
				
			||||||
    return match?.[2];
 | 
					    // /root/docker/vscodestat/src/extension.ts
 | 
				
			||||||
 | 
					    // \root\docker\vscodestat\src\extension.ts
 | 
				
			||||||
 | 
					    path = path.replace(/\\/g, '/');
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    const match = path.match(/\/docker\/([^/]+)/);
 | 
				
			||||||
 | 
					    if (match) {
 | 
				
			||||||
 | 
					        return match[1];
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return null;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,43 +0,0 @@
 | 
				
			|||||||
# Welcome to your VS Code Extension
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## What's in the folder
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
* This folder contains all of the files necessary for your extension.
 | 
					 | 
				
			||||||
* `package.json` - this is the manifest file in which you declare your extension and command.
 | 
					 | 
				
			||||||
  * The sample plugin registers a command and defines its title and command name. With this information VS Code can show the command in the command palette. It doesn’t yet need to load the plugin.
 | 
					 | 
				
			||||||
* `src/extension.ts` - this is the main file where you will provide the implementation of your command.
 | 
					 | 
				
			||||||
  * The file exports one function, `activate`, which is called the very first time your extension is activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`.
 | 
					 | 
				
			||||||
  * We pass the function containing the implementation of the command as the second parameter to `registerCommand`.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Get up and running straight away
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
* Press `F5` to open a new window with your extension loaded.
 | 
					 | 
				
			||||||
* Run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`.
 | 
					 | 
				
			||||||
* Set breakpoints in your code inside `src/extension.ts` to debug your extension.
 | 
					 | 
				
			||||||
* Find output from your extension in the debug console.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Make changes
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
* You can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`.
 | 
					 | 
				
			||||||
* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Explore the API
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
* You can open the full set of our API when you open the file `node_modules/@types/vscode/index.d.ts`.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Run tests
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
* Install the [Extension Test Runner](https://marketplace.visualstudio.com/items?itemName=ms-vscode.extension-test-runner)
 | 
					 | 
				
			||||||
* Run the "watch" task via the **Tasks: Run Task** command. Make sure this is running, or tests might not be discovered.
 | 
					 | 
				
			||||||
* Open the Testing view from the activity bar and click the Run Test" button, or use the hotkey `Ctrl/Cmd + ; A`
 | 
					 | 
				
			||||||
* See the output of the test result in the Test Results view.
 | 
					 | 
				
			||||||
* Make changes to `src/test/extension.test.ts` or create new test files inside the `test` folder.
 | 
					 | 
				
			||||||
  * The provided test runner will only consider files matching the name pattern `**.test.ts`.
 | 
					 | 
				
			||||||
  * You can create folders inside the `test` folder to structure your tests any way you want.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Go further
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
* [Follow UX guidelines](https://code.visualstudio.com/api/ux-guidelines/overview) to create extensions that seamlessly integrate with VS Code's native interface and patterns.
 | 
					 | 
				
			||||||
 * Reduce the extension size and improve the startup time by [bundling your extension](https://code.visualstudio.com/api/working-with-extensions/bundling-extension).
 | 
					 | 
				
			||||||
 * [Publish your extension](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) on the VS Code extension marketplace.
 | 
					 | 
				
			||||||
 * Automate builds by setting up [Continuous Integration](https://code.visualstudio.com/api/working-with-extensions/continuous-integration).
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user