Home

Awesome

<p align="center"> <a href="https://aurelia.io/" target="_blank"> <img alt="Aurelia" src="./images/aurelia-logo.png"> </a> </p> <p align="center"> <a href="https://opensource.org/licenses/MIT"> <img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.png"> </a> <a href="https://app.circleci.com/pipelines/github/aurelia/vscode-extension"> <img alt="CircleCI" src="https://circleci.com/gh/aurelia/aurelia.png?style=shield"> </a> <a href="http://www.typescriptlang.org/"> <img alt="TypeScript" src="https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.png"> </a> <a href="https://marketplace.visualstudio.com/items?itemName=AureliaEffect.aurelia"> <img alt="VS Code Marketplace Downloads" src="https://img.shields.io/visual-studio-marketplace/d/AureliaEffect.aurelia"> </a> <a href="https://marketplace.visualstudio.com/items?itemName=AureliaEffect.aurelia"> <img alt="VS Code Marketplace Installs" src="https://img.shields.io/visual-studio-marketplace/i/AureliaEffect.aurelia"> </a> </p>

Aurelia VSCode Extension

Quick links: --- Troubleshooting --- Setup --- Configuration ---

Provide Intellisense capabilities to your Aurelia project (through the LSP) by letting you access View Model variables in your Views, rename them across your components, and many other features. For a complete list, check out the Features. The extension works out of the box on Linux/Mac/Windows, but still allows you to customize it to your projects needs.

⚠️ Unstable warning

(Defintions: Show all places where <custom-element> component is used) defintions

Table of contents

Setup

<!-- CLI --> <table> <thead> <tr> <th>CLI</th> </tr> </thead> <tbody> <tr> <td> <pre> + --- root/ | + --- src/ // Default place where the Extension tries to search | for Aurelia files | + --- tsconfig.json // (Optional) Powers all the language features | (through a Typescript Program) | + --- jsconfig.json // Same as `tsconfig.json` | + --- package.json // Determine, if given project is an Aurelia project </pre> </td> </tr> </tbody> </table> <!-- Monorepo --> <table> <thead> <tr> <th>Monorepo</th> </tr> </thead> <tbody> <tr> <td> <pre> + --- root/ | + --- aurelia/ | + --- src/ // Default place where the Extension tries to search | for Aurelia files | + --- tsconfig.json // (Optional) Powers all the language features | (through a Typescript Program) | + --- package.json // Determine, if given project is an Aurelia project | + --- burelia/ | + (same as aurelia/) // Behaves the same as `aurelia/` | + --- non-aurelia/ // Will not get picked up | + ... </pre> </td> </tr> </tbody> </table> <!-- Complex --> <table> <thead> <tr> <th>Complex</th> </tr> </thead> <tbody> <tr> <td> <pre> + --- root/ | + --- frontend/ | + --- aurelia/ | + --- src/ // Default place where the Extension tries to search | for Aurelia files | + --- tsconfig.json // (Optional) Powers all the language features | (through a Typescript Program) | + --- package.json // Determine, if given project is an Aurelia project | + --- backend/ | + --- service/ </pre> </td> </tr> </tbody> </table>

Typescript

Javascript

Configuration

<!-- Complex --> <table> <thead> <tr> <th>Complex</th> </tr> </thead> <tbody> <tr> <td> <pre> + --- root/ | + --- frontend/ // aureliaProject.rootDirectory = | absolute/path/root/frontend | + --- aurelia/ | + --- deeper-path/ | + --- src/ // aureliaProject.pathToAureliaFiles = | absolute/path/root/.../deeper-path/src | + --- tsconfig.json // aureliaProject.pathToTsConfig = | absolute/path/root/.../aurelia/tsconfig.json | + --- package.json // aureliaProject.packageJsonInclude = | absolute/path/root/.../frontend/package.json | + --- backend/ | + --- service/ </pre> </td> </tr> </tbody> </table>

Features

You can find a more detailed list of features here. Furthermore, our tests are in a readable format and can provide much deeper insights into the extension behavior. You are encouraged to check those out:

<details> <summary>Preview test format (expand)</summary> The format, that is used is named [Gherkin](https://cucumber.io/docs/gherkin/)
```feature
  Feature: Completions - Methods.
    Background:
      Given the project is named "cli-generated"
      And I open VSCode with the following file "view-model-test.html"

    Scenario Outline: Empty brackets.
      Given I'm replacing the file content with <CODE>
      And I'm on the line <LINE> at character <CODE>
      When I trigger Suggestions with ''
      Then I should get the correct method <METHOD_NAME> with brackets

      Examples:
        | LINE | CODE                        | METHOD_NAME      |
        | 0    | `<div if.bind="f\|"></div>` | functionVariable |
```
</details>

Features table

(Legend below)

Feature/RegionA/AI/TIBABBCACEHTMLI/RRFSignalVC
Code Action
Completion
Definition➕*
Diagnostics
Hover
Rename➕*
(Document) Symbol
(Workspace) Symbol

Missing: Router, Promise, <let>

Legend

➕ : Supported ➕* : Partially (or unsable) supported ➖ : Not supported

A: AttributeCA: CustomAttributeRF: RepeatFor
AI: AttributeInterpolationCE: CustomElementTI: TextInterpolation
BA: BindableAttributeHTML: HTMLVC: ValueConverter
BB: BindingBehaviorI/R: Import/Require

Behavior

Installation

vsix

You can manually install the extension by downloading the .vsix file in the top right section under "Release". Once you downloaded it, install via

code --install-extension aurelia-2.x.y.vsix

Troubleshooting

Self diagnostics

  1. Logs
    1. Open the Output panel of VSCode ("Output: Focus on Output View")
    2. Select "Aurelia"
  2. Reloading
    • "Aurelia: Reload Extension"
    • Should behave the same as a full VSCode reload/restart
  3. If nothing from above helps, submit an issue, and we kindly ask you to follow the steps in the issue template.

General issues

Unstable warning

Please note, that due to the low iteration count, all features may not be as stable as we like them to be. Before submitting and issue, check out the General issues, Troubleshooting and [FAQ] section. If you still haven't found a solution to your problem, you are more than welcome to open an issue. The extension is in active use by the authors, so you can expect a swift response, but do note, that an actual fix cannot be guaranteed. Regardless, we are thankful, that you took the time to troubleshoot with us!

Releasing

# l.
bumb version in package.json
"version": "2.3.5"
npm i && npm run changelog
commit: chore(release): release v2.3.5

# 2.
git tag -a 2.3.5 -m "v2.3.5"
git push --follow-tags

Deleting tag when release failed

git tag -d 2.3.5
git push --delete origin 2.3.5

Prerelease

Use odd minor versions

"Real" Release

Use even minor versions

Acknowledgment