This minimalistic boilerplate is designed to help you quickly start developing extensions for Visual Studio Code. It provides a solid and ready-to-use base structure, allowing you to focus on implementing your unique features without wasting time setting up the development environment.
IDE: You can install it by typing "My extension" in the extension tab of your IDE
Instant Value - All basic tools included and configured:
- π§ Bun.js >= 1.0.26
- π§ Use Bun as package manager
- π ESM
- π§ͺ Biome for code formatting and linting
- β Jest or Bun test for fast unit testing and code coverage
- βοΈ EditorConfig for consistent coding style
- π¦ NPM scripts for common operations
- π Best package.json configuration for VSCode extension
- π Simple example of Snippet code and unit test
- π Run tasks with Grunt (example for backup)
- π Build faster with a preconfigured file and VSCE tool
- π₯οΈ Ungit for version control (git) with a GUI
Visual Studio Code supports a wide range of extensions that can enhance your development experience in various ways. While this boilerplate is specifically tailored for creating VSCode snippets
, it's important to note that there are several other types of extensions you can develop, such as language support, debugging tools, extension pack and more ... If you're interested in creating a different type of extension, you might need to adjust the template provided in this boilerplate. This could involve changing the package.json
file, modifying source code to implement the desired functionality, and potentially adding new dependencies or scripts to your project.
For more information, you can refer to the VSCode Extension API.
To use this template, use the following commands:
bun create github.com/RajaRakoto/vscode-boilerplate <project-name>
cd <project-name>
bun run pkg-upgrade # to upgrade outdated dependencies in interactive mode
NOTE 1: I employ the
MIT license
for this starter kit, which includes my name and GitHub profile. Please remember to adjust or remove it if deemed unnecessary.
NOTE 2: In order to help you better understand the structure of this boilerplate, there is a
README.md
file in each subdirectory of src.
NOTE 3: For certain configurations in the
package.json
file, you need to modify them to tailor them to your project (e.g: name, description, author, keywords, main, repository, ...).
Util
- π
es6
- To get all ES6 modules syntax from the source directory
Clean
- π
clean
- Remove coverage data, prod, build.
Build
- π
build
- Run the build.js script and utilize vsce to generate the vsix file for production
Testing
- π
test
- Run unit testing with Bun.js.
Linting and Formatting
- π
biome:start
- Starts the Biome daemon server. You can specify a custom configuration file path using the--config-path
option. - π
biome:stop
- Stops the Biome daemon server. - π
biome:fix
- Runs a source code check and applies automatic fixes (linter & formatter) according to the defined rules. - π
biome:unsafe
- Works likebiome:fix
, but may apply more invasive or risky changes.
Backup and Dependency Management
- π
backup
- Backup files with Grunt. - π
pkg-check
- Check useless dependencies with depcheck. - π
pkg-upgrade
- Upgrade outdated dependencies (interactive mode) with npm-check-updates.
Versioning
- π
versioning
- Start ungit server.
NPM Commands
- π
npm-version:major
- Increments the major version number of your project using npm. - π
npm-version:minor
- Increments the minor version number of your project using npm. - π
npm-version:patch
- Increments the version patch number of your project using npm.
NVM
- π
nvm
- Manage multiple node.js versions. Easily switch between node versions per project to ensure compatibility.
You can also check out my other starter projects:
- π bun-boilerplate
- π node-boilerplate
- π react-boilerplate
- π next-boilerplate
- π qwik-boilerplate
- π cli-boilerplate