Skip to content

Latest commit

 

History

History
55 lines (33 loc) · 3.11 KB

File metadata and controls

55 lines (33 loc) · 3.11 KB

Observatory

The observatory is a collection of tools designed to inspect GraalVM Native Images, also called Universes.

Setup

  1. Install Node & npm ( see https://docs.npmjs.com/downloading-and-installing-node-js-and-npm )
  2. Go to the root directory of the project containing package.json and install dependencies: npm ci
  3. You're good to go

You just want to run the project?

Navigate into the observatory folder and run npm run build && npm run preview. If you need some example build reports, you can find them in our repository releases.

IDE Setup

For VSCode the extensions Volar (and disable Vetur) + TypeScript Vue Plugin (Volar) are recommended by vite.

Development

As we use vite for development, there is some convenience that comes with it. Have a look at this stackoverflow thread for more information. In short:

  • npm run dev starts a local web server with hot module reloading for development.
  • npm run build builds the project and outputs it to the folder ./dist
  • npm run preview starts a local webserver that serves the version in ./dist

For linting and prettifying there are also commands:

  • npm run eslint-{check|autofix} runs eslint with the project configuration. If autofix is used, it will try to solve the problems itself.
  • npm run prettier-{check|autofix} runs prettier with the project configuration. If autofix is used, it will reformat all files managed by prettier.
  • npm run test runs all CI actions: eslint-check, prettier-check, and jest.

Other information

Jest

Jest is our Testing Framework. The official documentation presents many examples for own usage.

Vite

If you did not work with vite before, have a look at the documentation and the getting started guide.

Type Support For .vue Imports in TS

(from the vite project template)

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.