Skip to content

Instantly share code, notes, and snippets.

@H-G-Hristov
Last active November 13, 2019 10:35
Show Gist options
  • Select an option

  • Save H-G-Hristov/5235be3e679e5de558b919c796f5eae4 to your computer and use it in GitHub Desktop.

Select an option

Save H-G-Hristov/5235be3e679e5de558b919c796f5eae4 to your computer and use it in GitHub Desktop.

Revisions

  1. H-G-Hristov revised this gist Nov 13, 2019. 1 changed file with 15 additions and 0 deletions.
    15 changes: 15 additions & 0 deletions development.rst
    Original file line number Diff line number Diff line change
    @@ -4,9 +4,24 @@ How to Contribute
    Developer Reference
    -------------------

    Introduction on developing Visual Studio Code extensions:
    https://code.visualstudio.com/api/get-started/your-first-extension

    Documentation for the code itself is kept within the code, and is extracted via
    TypeDoc. See the developer reference documentation `here <dev/index.html>`_.

    Required packages (on Windows 10):

    TypeScript: https://www.typescriptlang.org/
    $ npm install -g typescript

    yarn: https://yarnpkg.com/
    Downloadn and install yarn manually

    gulp.js: https://gulpjs.com/
    $ npm install --global gulp-cli


    Building extension
    ------------------
    As with most VS Code extensions you need you need `Node.JS <https://nodejs.org/en/>`_ installed.
  2. H-G-Hristov created this gist Nov 13, 2019.
    54 changes: 54 additions & 0 deletions development.rst
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,54 @@
    How to Contribute
    =================

    Developer Reference
    -------------------

    Documentation for the code itself is kept within the code, and is extracted via
    TypeDoc. See the developer reference documentation `here <dev/index.html>`_.

    Building extension
    ------------------
    As with most VS Code extensions you need you need `Node.JS <https://nodejs.org/en/>`_ installed.

    The process if fairly straightforward:

    1. Install dependencies

    .. code:: bash
    $ npm install
    2. Compile the code:

    .. code:: bash
    $ npm run compile
    Of course build command (as few others) is available as Visual Studio Code task.

    Coding guidelines
    -----------------

    Formatting
    ::::::::::
    Code is formatted using ``clang-format``. It is recommended to install
    `Clang-Format extension <https://marketplace.visualstudio.com/items?itemName=xaver.clang-format>`_.

    Linting
    :::::::
    We use tslint for linting our sources.
    You can run tslint across the sources by calling ``npm run lint`` from a terminal or command prompt.
    You can also run ``npm: lint`` as a Code task by pressing ``CMD+P`` (``CTRL+P`` on Windows) and entering ``task lint``.
    Warnings from tslint show up in the Errors and Warnings quick box and you can navigate to them from inside Code.
    To lint the source as you make changes you can install the `tslint extension <https://marketplace.visualstudio.com/items/eg2.tslint>`_.

    Style
    :::::

    * Use inline field initializers whenever possible.
    * Declare properties in constructor parameters lists, when possible.
    * Use ``lowerCamelCase`` for public members, methods, and function/method parameters.
    * Use ``snake_case`` for variables.
    * Use ``kebab-case`` for files and directories. (hyphen-separated-names)
    * Prefix private members/methods with an underscore and write them ``_withCamelCase``