Local Packaging and Installation
- Install VSCE (Visual Studio Code Extensions) globally:
npm install -g @vscode/vsce
- Make sure your package.json includes a "publisher" field (for local testing you can use any name):
{
"name": "file-combiner",
"publisher": "your-name",
...
}
- Package the extension:
vsce package
This creates a .vsix file in your project directory.
- Install the extension locally:
code --install-extension file-combiner-0.0.1.vsix
Publishing to VS Code Marketplace
Create a Microsoft Azure DevOps account (free) at https://dev.azure.com/
Create a Personal Access Token (PAT):
Login to VSCE with your PAT:
vsce login your-publisher-name
- Update your package.json with required fields:
{
"name": "file-combiner",
"displayName": "File Combiner",
"description": "Combines selected files into a single in-memory file with path tracking",
"version": "0.0.1",
"publisher": "your-publisher-name",
"repository": {
"type": "git",
"url": "https://github.com/username/file-combiner.git"
},
"categories": ["Other"],
"galleryBanner": {
"color": "#C80000",
"theme": "dark"
},
"keywords": [
"file",
"combine",
"merge",
"concatenate"
],
"engines": {
"vscode": "^1.85.0"
}
}
Add a README.md file with:
- Description of the extension
- Features list
- Installation instructions
- Usage instructions
- Configuration options
- Requirements
- Known issues
- Change log
Add a LICENSE file (e.g., MIT License)
Add a CHANGELOG.md file:
# Change Log
## [0.0.1] - 2024-02-18
- Initial release
- Basic file combining functionality
- Tree view UI
- File watching and updating
- Publish to VS Code Marketplace:
vsce publish
Optional: Publishing to Open VSX Registry
If you want your extension to be available for other VS Code-like editors (VSCodium, etc.):
Create an Open VSX token:
Publish to Open VSX:
npx ovsx publish -p <token>
Best Practices Before Publishing
Test the extension thoroughly:
- Test all commands
- Test with different file types
- Test with large folders
- Test error scenarios
- Test in both Windows and Linux/Mac if possible
Update your README.md with:
# File Combiner
Combines multiple files into a single file with path tracking and live updates.
## Features
- Select and combine multiple files
- Watch for file changes
- Preview combined content
- Copy to clipboard
- Tree view UI
- Configurable file extensions
- Configurable file separator
- Gitignore support
## Requirements
- VS Code 1.85.0 or higher
## Extension Settings
This extension contributes the following settings:
* `fileCombiner.fileExtensions`: Array of file extensions to include
* `fileCombiner.separator`: Separator string between files
## Known Issues
[List any known issues or limitations]
## Release Notes
### 0.0.1
Initial release of File Combiner
- Add a .vscodeignore file to exclude unnecessary files from the package:
.vscode/**
.vscode-test/**
node_modules/**
src/**
.gitignore
.yarnrc
webpack.config.js
**/tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
code --uninstall-extension fairytech.better-ai-prompts
code --install-extension better-ai-prompts-0.0.3.vsix
code --list-extensions | grep "fairytech"