Skip to content

Latest commit

 

History

History
70 lines (50 loc) · 2.03 KB

contribution-guide.md

File metadata and controls

70 lines (50 loc) · 2.03 KB

Contribution guide

Prerequisites

  • Node.js (8.11.1 or later)
  • Npm (5.6.0 or later)
  • VS Code (1.40.0 or later)

Run and development

# 1. Clone the project
$ git clone git@github.com:docascode/vscode-docs-build.git
$ cd vscode-docs-build

# 2. Install dependencies
$ npm i

# 3. Open the project by VS Code
$ code .

# 4. Press `F5` to run the extension

Debug

Debug the extension

  1. Set a breakpoint.
  2. Select Run extension in the Run and Debug Tab.
  3. Press F5 to run the extension
  4. Check the Variables, Call Stack and use the Watch in the Run and Debug Tab.

Debug the E2E test

  1. Set a breakpoint.
  2. Set VSCODE_DOCS_BUILD_EXTENSION_BUILD_USER_TOKEN in launch.json
  3. Run git submodule update --init in terminal.
  4. Select Launch extension e2e tests in the Run and Debug Tab.
  5. Press F5 to run the extension
  6. Check the Variables, Call Stack and use the Watch in the Run and Debug Tab.

Debug the UT

  1. Set a breakpoint.
  2. Select Launch extension unit tests in the Run and Debug Tab.
  3. Press F5 to run the extension
  4. Check the Variables, Call Stack and use the Watch in the Run and Debug Tab.

Debug the benchmark test

  1. Set a breakpoint.
  2. Set VSCODE_DOCS_BUILD_EXTENSION_BUILD_USER_TOKEN in launch.json
  3. Select Launch extension benchmark tests in the Run and Debug Tab.
  4. Press F5 to run the extension
  5. Check the Variables, Call Stack and use the Watch in the Run and Debug Tab.

Debug the runtime dependencies update script

  1. Set a breakpoint.
  2. Select Launch runtime dependencies update script in the Run and Debug Tab.
  3. Press F5 to run the extension
  4. Check the Variables, Call Stack and use the Watch in the Run and Debug Tab.

Scripts

  • npm run test: Run all the test including E2E test(requires two tokens be set by environment variable) and Unit test
  • npm run test:unit: Run Unit test
  • npm run benchmark: Run benchmark
  • npm run lint: Run ESLint