👍🎉 First off, thanks for taking the time to contribute! 🎉👍
When contributing to this project, please first discuss the changes you wish to make via an issue before making changes.
Please note the Code of Conduct document, please follow it in all your interactions with this project.
Unsure where to begin contributing? You can start by looking through the help-wanted
issues.
git clone https://github.com/eamodio/vscode-restore-editors.git
Prerequisites
From a terminal, where you have cloned the repository, execute the following command to install the required dependencies:
yarn
From a terminal, where you have cloned the repository, execute the following command to re-build the project from scratch:
yarn run rebuild
👉 NOTE! This will run a complete rebuild of the project.
Or to just run a quick build, use:
yarn run build
During development you can use a watcher to make builds on changes quick and easy. From a terminal, where you have cloned the repository, execute the following command:
yarn run watch
Or use the provided watch
task in VS Code, execute the following from the command palette (be sure there is no >
at the start):
task watch
This will first do an initial full build and then watch for file changes, compiling those changes incrementally, enabling a fast, iterative coding experience.
👉 Tip! You can press CMD+SHIFT+B (CTRL+SHIFT+B on Windows, Linux) to start the watch task.
👉 Tip! You don't need to stop and restart the development version of Code after each change. You can just execute Reload Window
from the command palette.
This project uses prettier for code formatting. You can run prettier across the code by calling yarn run pretty
from a terminal.
To format the code as you make changes you can install the Prettier - Code formatter extension.
Add the following to your User Settings to run prettier:
"editor.formatOnSave": true,
This project uses ESLint for code linting. You can run ESLint across the code by calling yarn run lint
from a terminal. Warnings from ESLint show up in the Errors and Warnings
quick box and you can navigate to them from inside VS Code.
To lint the code as you make changes you can install the ESLint extension.
To generate a production bundle (without packaging) run the following from a terminal:
yarn run bundle
To generate a VSIX (installation package) run the following from a terminal:
yarn run package
- Open the
vscode-restore-editors
folder - Ensure the required dependencies are installed
- Choose the
Watch & Run
launch configuration from the launch dropdown in the Run and Debug viewlet and pressF5
.
Note: If you see a pop-up with a message similar to "The task cannot be tracked. Make sure to have a problem matcher defined.", you will need to install the TypeScript + Webpack Problem Matchers extension.
- Open the
vscode-restore-editors
folder - Ensure the required dependencies are installed
- Choose the
Watch & Run (web)
launch configuration from the launch dropdown in the Run and Debug viewlet and pressF5
.
- Open the
vscode-restore-editors
folder - Ensure the required dependencies are installed
- Run the
build
orwatch
task from the command palette - Run the
Run (local web)
task from the command palette
- Open the
vscode-restore-editors
folder - Ensure the required dependencies are installed
- Run the
build
orwatch
task from the command palette - Run the
Run (vscode.dev)
task from the command palette
Please follow all the instructions in the PR template.
The Change Log is updated manually and an entry should be added for each change. Changes are grouped in lists by added
, changed
, removed
, or fixed
.
Entries should be written in future tense:
- Be sure to give yourself much deserved credit by adding your name and user in the entry
Added
- Adds awesome feature — closes #<issue> thanks to PR #<pr> by Your Name (@<your-github-username>)
Changed
- Changes or improves an existing feature — closes #<issue> thanks to PR #<pr> by Your Name (@<your-github-username>)
Fixed
- Fixes #<issue> a bug or regression — thanks to PR #<pr> by Your Name (@<your-github-username>)
If this is your first contribution to Restore Editors, please give yourself credit by adding yourself to the Contributors
section of the README in the following format:
Your Name ([@<your-github-username>](https://github.com/<your-github-username>)) — [contributions](https://github.com/eamodio/vscode-restore-editors/commits?author=<your-github-username>)
Restore Editors version changes are bucketed into two types:
minor
: normal release (new features, enhancements and fixes)patch
: hotfix release (just fixes)
Note: major
version bumps are only considered for more special circumstances.
Use the prep-release script to prepare a new release. The script updates the package.json and CHANGELOG.md appropriately, commits the changes as Bumps to v<major.minor.patch>
, and creates a v<major.minor.patch>
tag which when pushed will trigger the CI to publish a release.
- Ensure you are on a clean working tree
- Run
yarn run prep-release
and enter the desired version when prompted. - Review the
Bumps to v<major.minor.patch>
commit - Run
git push --follow-tags
to push the commit and tag
Pushing the v<major.minor.patch>
tag will trigger the Publish Stable workflow to automatically package the extension, create a GitHub release, and deploy it to the VS Marketplace.
If the action fails and retries are unsuccessful, the VSIX can be built locally with yarn package
and uploaded manually to the marketplace. A GitHub release can also be created manually using v<major.minor.patch>
as the title and the notes from the CHANGELOG.md with the VSIX attached.
The Publish Pre-release workflow is automatically run every AM unless no new changes have been committed to main
.