From 147c680b5072d83d1975ecc61b04d5118ec27bec Mon Sep 17 00:00:00 2001 From: Pine Wu Date: Mon, 8 Oct 2018 13:41:57 -0700 Subject: [PATCH] Add contributing guideline and remove unneeded parts --- .github/CONTRIBUTING.md | 3 ++ .github/SAMPLE_GUIDELINE.md | 11 ++++++ README.md | 35 ++++++++--------- package.json | 17 ++------ vscode-samples.code-workspace | 73 ----------------------------------- 5 files changed, 35 insertions(+), 104 deletions(-) create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/SAMPLE_GUIDELINE.md delete mode 100644 vscode-samples.code-workspace diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 000000000..41413be71 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,3 @@ +# Contributing to vscode-extension-samples + +If you want to contribute a new sample, see [Sample Guideline](./SAMPLE_GUIDELINE.md) \ No newline at end of file diff --git a/.github/SAMPLE_GUIDELINE.md b/.github/SAMPLE_GUIDELINE.md new file mode 100644 index 000000000..a0bc65ffa --- /dev/null +++ b/.github/SAMPLE_GUIDELINE.md @@ -0,0 +1,11 @@ +# Sample Guideline + +Each sample should have the following components and structure, so that users could have a smooth experience when playing with the samples. + +## README + +- Each README should start with a short sentence / paragraph that describes what the extensions is and what it is meant to illustrate. +- If the sample has a corresponding guide, it should link to the guide. +- If the illustrated functionality is visual, a gif/image should follow the explanation. +- A `Running the sample` section should describe the actions to run the sample. + - Mostly, it should be: Open this sample in VS Code -> `npm install && npm compile` -> Run `Launch Sample` target. diff --git a/README.md b/README.md index afc571f0a..66a002fea 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,28 @@

- VS Code in action -
-
- VS Code Extension Samples

+This repository contains sample code illustrating the VS Code extension API. Each sample is a self-contained extension that explains one topic. + +| Sample | Guide | API | +| ------ | ----- | --- | +| [Virtual Documents](/contentprovider-sample/README.md) | [https://vscode-ext-docs.azurewebsites.net/api/extension-guides/virtual-documents](/api/extension-guides/virtual-documents) | [`TextDocumentContentProvider`](https://code.visualstudio.com/docs/extensionAPI/vscode-api#TextDocumentContentProvider) | -This repository contains sample code illustrating the VS Code extension API. The following is a -list of self-contained, running extensions that show one or multiple concepts of the API: -* [Virtual Documents](/contentprovider-sample/README.md) -* [Editor Decoration](/decorator-sample/README.md) -* [Status Bar](/statusbar-sample/README.md) -* [Theme](/theme-sample) -* [Integrated Terminal](/terminal-sample/README.md) -* [Vim](/vim-sample/README.md) -* [Tree views](/tree-view-sample/README.md) -* [Webview](/webview-sample/README.md) +- [Virtual Documents](/contentprovider-sample/README.md) +- [Editor Decoration](/decorator-sample/README.md) +- [Status Bar](/statusbar-sample/README.md) +- [Theme](/theme-sample) +- [Integrated Terminal](/terminal-sample/README.md) +- [Vim](/vim-sample/README.md) +- [Tree views](/tree-view-sample/README.md) +- [Webview](/webview-sample/README.md) # ➡️ Getting Started You can get started locally by following these steps: -* **Step #1**: `git clone https://github.com/Microsoft/vscode-extension-samples vscode-extension-samples` -* **Step #2**: `cd vscode-extension-samples` -* **Step #3**: `npm install` -* **Step #4**: Open [VSCode](https://code.visualstudio.com/) and start a sample from the debug viewlet. +- **Step #1**: `git clone https://github.com/Microsoft/vscode-extension-samples vscode-extension-samples` +- **Step #2**: `cd vscode-extension-samples` +- **Step #3**: `npm install` +- **Step #4**: Open [VSCode](https://code.visualstudio.com/) and start a sample from the debug viewlet. diff --git a/package.json b/package.json index e4c4cf384..570d897dd 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,5 @@ { - "name": "vsc-extension-samples", - "publisher": "Microsoft", - "version": "0.0.1", - "scripts": { - "postinstall": "node .build/postinstall.js", - "compile-completions": "cd completions-sample && tsc", - "compile-decorator": "cd decorator-sample && npm run compile", - "compile-previewhtml": "cd previewhtml-sample && npm run compile", - "compile-contentprovider": "cd contentprovider-sample && npm run compile", - "compile-languageprovider": "cd languageprovider-sample && npm run compile && cd ..", - "compile-statusbar": "cd statusbar-sample && npm run compile && cd .." - } -} \ No newline at end of file + "name": "vsc-extension-samples", + "publisher": "Microsoft", + "version": "0.0.1" +} diff --git a/vscode-samples.code-workspace b/vscode-samples.code-workspace deleted file mode 100644 index 4267a48cd..000000000 --- a/vscode-samples.code-workspace +++ /dev/null @@ -1,73 +0,0 @@ -{ - "folders": [ - { - "path": "fsprovider-sample" - }, - { - "path": "lsp-sample" - }, - { - "path": "multi-diagnostics-sample" - }, - { - "path": "terminal-sample" - }, - { - "path": "completions-sample" - }, - { - "path": "configuration-sample" - }, - { - "path": "decorator-sample" - }, - { - "path": "i18n-sample" - }, - { - "path": "lsp-multi-server-sample" - }, - { - "path": "progress-sample" - }, - { - "path": "tree-view-sample" - }, - { - "path": "basic-multi-root-sample" - }, - { - "path": "contentprovider-sample" - }, - { - "path": "previewhtml-sample" - }, - { - "path": "smart-template-strings-sample" - }, - { - "path": "statusbar-sample" - }, - { - "path": "task-provider-sample" - }, - { - "path": "theme-sample" - }, - { - "path": "vim-sample" - }, - { - "path": "extension-deps-sample" - }, - { - "path": "nodefs-provider-sample" - }, - { - "path": "webview-sample" - }, - { - "path": "webpack-sample" - } - ] -}