Skip to content

Commit 09fabd2

Browse files
authored
Add an introduction and a prerequisite section. (#656)
resolves #655
1 parent bf5ee4f commit 09fabd2

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

CONTRIBUTING.adoc

+20-6
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,33 @@
33
:uri-atom-textmate-language-raw: https://raw.githubusercontent.com/asciidoctor/atom-language-asciidoc/master/grammars/language-asciidoc.cson
44
:uri-npm-package-cson: https://www.npmjs.com/package/cson
55

6-
== Hacking and Testing the Extension
6+
This guide describes how to develop changes for this Visual Studio Code plugin and how to test them locally.
77

8-
. Clone the repository from Github
8+
== Prerequisites
9+
10+
Before developing changes, install the following prerequisites:
11+
12+
. https://nodejs.org/en/[Node 16 or later]
13+
. https://code.visualstudio.com/[Visual Studio Code]
14+
. https://git-scm.com/[Git]
15+
16+
== Developing Changes and Testing the Extension
17+
18+
. Clone the repository from GitHub.
919
+
1020
$ git clone https://github.com/asciidoctor/asciidoctor-vscode.git
1121

1222
. Open the folder within Visual Studio Code.
1323

24+
. Download NPM package dependencies.
25+
+
26+
$ npm install
27+
1428
. Make changes (ideally on a separate branch).
1529

1630
Testing is done differently on the desktop client and the web client.
1731

18-
=== Desktop
32+
=== Running the Desktop version
1933

2034
. With the folder open in Visual Studio code, from the menu bar, select Run > 'Start Debugging' (or click the Run and Debug icon on the left sidebar and click on the green 'Run Extension' play button)
2135
. A new Visual Studio Code instance will open with '[Extension Development Host]' in the header.
@@ -34,20 +48,20 @@ To run the tests suite, select 'Run Extension Tests' in the 'Run' view then, cli
3448
You can also run the tests suite from a terminal using:
3549

3650
$ npm t
37-
51+
3852
[NOTE]
3953
====
4054
In that case, you must close your Visual Studio code instance otherwise you will get an error:
4155
4256
Running extension tests from the command line is currently only supported if no other instance of Code is running.
4357
====
4458

45-
=== Web
59+
=== Running the Web version
4660

4761
On Linux to test the extension run the following command within the repository folder from the command line:
4862

4963
$ npm run build-web && npm run build-preview && npx @vscode/test-web --browserType=chromium --extensionDevelopmentPath=${PWD}
50-
64+
5165
IMPORTANT: In development, you will need to disable security because resources are loaded through http://localhost:3000/static/devextensions
5266

5367
TIP: Looking at the browser's Web Developer tools can often help locate errors.

0 commit comments

Comments
 (0)