-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up publishing to the VSCode marketplace (#26)
* Add properties to package.json for publishing * Remove unnecessary files for now Changelog will be reported in readme for now * Ran bundling instructions https://code.visualstudio.com/api/working-with-extensions/bundling-extension * Add back changelog because its mentioned in vcse docs * Ignore readme-dark.png in package for smaller size * Compress images for better file size * Add more documentation * Add sponsor and keyword info * Change author name to single property * Add link to the marketplace
- Loading branch information
1 parent
ee1348e
commit 19be391
Showing
18 changed files
with
2,164 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
#VsCode extension files | ||
out | ||
dist | ||
node_modules | ||
.vscode-test/ | ||
*.vsix | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
{ | ||
// See http://go.microsoft.com/fwlink/?LinkId=827846 | ||
// for the documentation about the extensions.json format | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"ms-vscode.extension-test-runner" | ||
] | ||
} | ||
// See http://go.microsoft.com/fwlink/?LinkId=827846 | ||
// for the documentation about the extensions.json format | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"connor4312.esbuild-problem-matchers", | ||
"ms-vscode.extension-test-runner" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"files.exclude": { | ||
"out": false // set this to true to hide the "out" folder with the compiled JS files | ||
}, | ||
"search.exclude": { | ||
"out": true // set this to false to include "out" folder in search results | ||
}, | ||
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts | ||
"typescript.tsc.autoDetect": "off" | ||
} | ||
"files.exclude": { | ||
"out": false, // set this to true to hide the "out" folder with the compiled JS files | ||
"dist": false // set this to true to hide the "dist" folder with the compiled JS files | ||
}, | ||
"search.exclude": { | ||
"out": true, // set this to false to include "out" folder in search results | ||
"dist": true // set this to false to include "dist" folder in search results | ||
}, | ||
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts | ||
"typescript.tsc.autoDetect": "off" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,64 @@ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "watch", | ||
"problemMatcher": "$tsc-watch", | ||
"isBackground": true, | ||
"presentation": { | ||
"reveal": "never" | ||
}, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
} | ||
] | ||
} | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "watch", | ||
"dependsOn": [ | ||
"npm: watch:tsc", | ||
"npm: watch:esbuild" | ||
], | ||
"presentation": { | ||
"reveal": "never" | ||
}, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
}, | ||
{ | ||
"type": "npm", | ||
"script": "watch:esbuild", | ||
"group": "build", | ||
"problemMatcher": "$esbuild-watch", | ||
"isBackground": true, | ||
"label": "npm: watch:esbuild", | ||
"presentation": { | ||
"group": "watch", | ||
"reveal": "never" | ||
} | ||
}, | ||
{ | ||
"type": "npm", | ||
"script": "watch:tsc", | ||
"group": "build", | ||
"problemMatcher": "$tsc-watch", | ||
"isBackground": true, | ||
"label": "npm: watch:tsc", | ||
"presentation": { | ||
"group": "watch", | ||
"reveal": "never" | ||
} | ||
}, | ||
{ | ||
"type": "npm", | ||
"script": "watch-tests", | ||
"problemMatcher": "$tsc-watch", | ||
"isBackground": true, | ||
"presentation": { | ||
"reveal": "never", | ||
"group": "watchers" | ||
}, | ||
"group": "build" | ||
}, | ||
{ | ||
"label": "tasks: watch-tests", | ||
"dependsOn": [ | ||
"npm: watch", | ||
"npm: watch-tests" | ||
], | ||
"problemMatcher": [] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
.vscode/** | ||
.vscode-test/** | ||
out/** | ||
node_modules/** | ||
src/** | ||
.gitignore | ||
.yarnrc | ||
esbuild.js | ||
vsc-extension-quickstart.md | ||
**/tsconfig.json | ||
**/eslint.config.mjs | ||
**/*.map | ||
**/*.ts | ||
**/.vscode-test.* | ||
|
||
resources/readme-dark.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
# README Auto Open: Help your team onboard! | ||
|
||
A VSCode plug-in that automatically opens the project's README when you open a project for the first time, ensuring people read it. Once opened, this plug-in will not activate again until you reset the state. | ||
A [VSCode plug-in](https://marketplace.visualstudio.com/items?itemName=sandertenbrinke.readme-auto-open) that automatically opens the project's README when you open a project for the first time, ensuring people read it. Once opened, this plug-in will not activate again until you reset the state. | ||
|
||
![An image of a README](https://media.githubusercontent.com/media/sander1095/vscode-readme-auto-open/main/resources/readme-dark.png) | ||
|
||
## Why should you use this? | ||
A (good) README is critical for understanding how to use a project, and this extension ensures that it's the first thing people see when they open a project. | ||
|
||
💡 Add this to your workspace's [recommended extensions](https://code.visualstudio.com/docs/editor/extension-marketplace#_workspace-recommended-extensions) to ensure all contributors will read the README! | ||
|
||
## Features | ||
|
||
- Automatically opens the README when you open a project for the first time. | ||
- This plug-in will case-insensitively look for a `README` file in the root of your project, with or without any file extension. | ||
- If the file is in markdown format (`.md`), it will open it in preview mode. | ||
- You can reset the state of this plug-in so it will be re-opened next time you open your project by using the `Readme Auto Open: Reset State` command. | ||
|
||
### 1.0.0 | ||
|
||
Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Release instructions | ||
|
||
This extension is released on the [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=sandertenbrinke.readme-auto-open). This document contains the release process | ||
|
||
❗ This will [need to be automated](https://github.com/sander1095/vscode-readme-auto-open/issues/2) at some point, but for now it's a manual process. | ||
|
||
```bash | ||
# Install the Visual Studio Code Extension Manager | ||
npm install -g @vscode/vsce | ||
|
||
# Login to the Visual Studio Code Marketplace | ||
# The PAT (Marketplace, Manage) can be created on Azure DevOps (https://dev.azure.com/stenbrinke/_usersSettings/tokens) and is stored in GitHub Secrets. | ||
vsce login sandertenbrinke | ||
|
||
# Package the extension | ||
# This calls the vscode:prepublish script in package.json | ||
vsce package | ||
|
||
# Test the package | ||
code --install-extension readme-auto-open-1.0.0.vsix | ||
|
||
# Publish the package | ||
# This can be done by uploading the .vsix file in the Visual Studio Code Marketplace (https://marketplace.visualstudio.com/manage/publishers/sandertenbrinke) | ||
# Or by running the following command: | ||
vsce publish | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Support | ||
|
||
Thank you for using **Readme Auto Open**! If you need help or have any questions, please use the following resources: | ||
|
||
## Issues | ||
|
||
If you encounter any bugs or have feature requests, please open an issue on our [GitHub Issues page](https://github.com/sander1095/vscode-readme-auto-open/issues). | ||
|
||
## Discussions | ||
|
||
For general questions or discussions, please visit the [GitHub Discussions page](https://github.com/sander1095/vscode-readme-auto-open/discussions). | ||
|
||
Your feedback is appreciated! Thanks for your support! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
const esbuild = require("esbuild"); | ||
|
||
const production = process.argv.includes('--production'); | ||
const watch = process.argv.includes('--watch'); | ||
|
||
/** | ||
* @type {import('esbuild').Plugin} | ||
*/ | ||
const esbuildProblemMatcherPlugin = { | ||
name: 'esbuild-problem-matcher', | ||
|
||
setup(build) { | ||
build.onStart(() => { | ||
console.log('[watch] build started'); | ||
}); | ||
build.onEnd((result) => { | ||
result.errors.forEach(({ text, location }) => { | ||
console.error(`✘ [ERROR] ${text}`); | ||
console.error(` ${location.file}:${location.line}:${location.column}:`); | ||
}); | ||
console.log('[watch] build finished'); | ||
}); | ||
}, | ||
}; | ||
|
||
async function main() { | ||
const ctx = await esbuild.context({ | ||
entryPoints: [ | ||
'src/extension.ts' | ||
], | ||
bundle: true, | ||
format: 'cjs', | ||
minify: production, | ||
sourcemap: !production, | ||
sourcesContent: false, | ||
platform: 'node', | ||
outfile: 'dist/extension.js', | ||
external: ['vscode'], | ||
logLevel: 'silent', | ||
plugins: [ | ||
/* add to the end of plugins array */ | ||
esbuildProblemMatcherPlugin, | ||
], | ||
}); | ||
if (watch) { | ||
await ctx.watch(); | ||
} else { | ||
await ctx.rebuild(); | ||
await ctx.dispose(); | ||
} | ||
} | ||
|
||
main().catch(e => { | ||
console.error(e); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,4 @@ export default [{ | |
"no-throw-literal": "warn", | ||
semi: "warn", | ||
}, | ||
}]; | ||
}]; |
Oops, something went wrong.