Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README, .vscode from template #9

Merged
merged 1 commit into from
Oct 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"recommendations": [
"arcanis.vscode-zipfs",
"davidanson.vscode-markdownlint",
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"henrynguyen5-vsc.vsc-nvm",
"redhat.vscode-yaml"
]
}
19 changes: 16 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
{
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true,
"editor.rulers": [
80
]
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true,
"editor.rulers": [
80
]
},
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
},
"eslint.format.enable": true,
"eslint.nodePath": ".yarn/sdks",
"files.exclude": {
"**/.git": true
Expand All @@ -32,11 +41,15 @@
"url": "https://raw.githubusercontent.com/Septh/tmlanguage/master/tmlanguage.json"
}
],
"markdownlint.config": {
"MD033": false
},
"search.exclude": {
"/.yarn": true,
"/.pnp.*": true,
"/extension/dist": true,
"/extension/out": true,
"/extension/work": true,
"**/.yarn": true,
"**/.pnp.*": true
},
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.tsdk": ".yarn/sdks/typescript/lib"
Expand Down
43 changes: 27 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,21 @@ the following numbering scheme:

### Publishing to the Marketplace

After deciding on a target version, run:
1. Check out the `main` branch and make sure it is pristine.

- `git checkout main`
- `yarn login`
- `yarn publish-vsce [--pre-release] [version]`
2. Decide on a new version number under which to publish the package.

The `yarn publish-vsce` command first updates the version number in
[extension/package.json](./extension/package.json) to the given
version. Then it packages and publishes the extension to the VS Code
Extension Marketplace.
3. Edit the `extension/package.json` manifest to reflect
the new version number.

4. Run: `yarn package`

5. If necessary, run: `yarn login`

6. Run: `yarn publish-vsce`

The final `yarn […] publish-vsce` command packages and publishes the
extension to the VS Code Extension Marketplace.

### Publishing to the Open VSX Registry

Expand All @@ -96,10 +101,12 @@ Follow these steps to publish the extension to the Open VSX Registry:

2. Make sure you have published the extension to the VS Code
Extension Marketplace. This ensures that the version number has
been updated and that a `.vsix` file has been generated.
been updated.
3. Run `yarn package` to generate a `.vsix` package.

3. Run the `yarn ovsx publish` command with the correct
`extension/[…].vsix` file as the sole argument. Example in Bash:
4. Run the `yarn ovsx publish` command with the correct
`extension/[…].vsix` file as the sole argument.
Example in Bash:

```bash
yarn ovsx publish "extension/vice-settings-$(jq -r .version extension/package.json).vsix"
Expand All @@ -111,7 +118,7 @@ With the extension now published on the Marketplace, commit the
change, create a tag, push, cut a GitHub (pre-)release, and create a
pull request against `main`:

```
```bash
(
set -eux
git checkout -b publish
Expand All @@ -121,7 +128,7 @@ pull request against `main`:
git commit --edit -m "Release ${tag}"
git tag "${tag}"
git push --tags
gh release create --generate-notes --prerelease "${tag}"
gh release create --draft --generate-notes "${tag}"
gh pr create --fill --web
)
```
Expand Down Expand Up @@ -167,7 +174,7 @@ dependencies. That includes the `@types` and `@yarnpkg` scopes but
excludes Yarn itself (see the `yarn upgrade-yarn-itself` section).

Also excluded is the `@types/vscode` package. For details, see
section _Upgrading the VS Code API_.
section _Upgrading the VS Code API version_.

### yarn upgrade-yarn-itself

Expand Down Expand Up @@ -225,9 +232,13 @@ Since this project is already patching this dependency, you may want to apply th
patch < path/to/this/project/.yarn/patches/@vscode-vsce-npm-2.21.1.patch
```

### Finish editing
### Committing a patch for the first time

To commit a patch for the first time, run `yarn patch-commit -s <workdir>`.

### Modifying an existing patch

To commit the patch, run `yarn repatch -- <workdir>`.
To commit a modified patch, run `yarn repatch -- <workdir>`.

For example, if the temporary working directory is `/tmp/xfs-36e26fe6/user`, run:

Expand Down
1 change: 0 additions & 1 deletion extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"description": "Keymaps, hotkeys and other settings for VICE",
"categories": [],
"keywords": [],
"preview": true,
"main": "dist/extension.js",
"icon": "icon.png",
"contributes": {
Expand Down