remvs
v1.0.0
Published
VSCode Rebranding Tool
Readme
Remvs - VSCode Rebranding Tool
A command line tool for customizing VSCode.
Installation
npm install -g remvsUsage
Create a New Project
remvs new <project-name>This command will perform the following tasks:
- Initialize a new git repository
- Set git configuration (
git config --global protocol.file.allow always) to allow file protocol - Cache only the latest commit of Microsoft/vscode (shallow clone) and add it as a submodule
- First time it will clone only the latest commit and save it to
~/vscode/[tagName]directory - Subsequent uses will use the cache, which is much faster
- First time it will clone only the latest commit and save it to
- Create the following folder structure for the project:
./branding/vscode ./branding/website ./.project/ ./vscode /// submodule - Automatically navigate to the project directory and run the
remvs reinitcommand
Reinitialize Project
remvs reinitThis command will perform the following tasks:
- Create a
.remvs.jsonconfiguration file, which includes:- Which files to copy
- Source and target paths for each file
- How to copy files (full copy or partial copy)
- Which fields to extract for partial JSON file copies
- Copy all files from the VSCode submodule to the
.projectdirectory - Copy partial JSON files separately to the
branding/vscodedirectory
Merge and Sync Files
remvs mergeThis command will perform the following tasks:
- Using the
.remvs.jsonconfiguration file:- Determine which files to copy
- For partial JSON files, update only specified fields
- Copy full files directly
- Monitor file changes in the
branding/vscodedirectory - When a file changes:
- If it's a JSON file: merge specified fields into the
.projectdirectory - For other files: copy to the
.projectdirectory
- If it's a JSON file: merge specified fields into the
Partial JSON File Copy Example
For example, copying specific fields from the package.json file:
// Original: vscode/resources/app/package.json -> branding/vscode/resources/app/package.json
// Only these fields are extracted:
{
"name": "your-vscode",
"displayName": "Your VS Code",
"description": "Your Custom Code Editor"
}Watch Files and Build
remvs watchThis command will perform the following tasks:
- Monitor file changes in the
branding/vscodedirectory - When a file changes:
- Automatically process the file to the
.projectdirectory - Show build status
- Automatically process the file to the
About Caching
The remvs tool automatically caches only the latest commit (shallow clone) of the Microsoft/vscode repository in the ~/vscode/[tagName] directory. As a result:
- The first time you run the
remvs newcommand, it downloads and caches only the most recent commit of the repository (using--depth=1) - Subsequent uses of the same command will copy from the cache, which is much faster
- Each time it tries to update the cache, bringing only the latest commit
This approach:
- Uses less disk space (by not downloading the entire history)
- Reduces download time (by downloading only the latest commit)
- Updates quickly (from the latest commit)
- Runs
git config --global protocol.file.allow alwayscommand to enable file protocol, which is necessary for submodules to work
Command List
remvs new <n>: Creates a new VSCode rebranding projectremvs reinit: Reinitializes the projectremvs merge: Monitors file changes and merges themremvs watch: Monitors file changes and buildsremvs run <script>: Runs npm scripts in the .project directoryremvs test: Checks rebranding status
License
UNLICENSED
