The Official Web Widget for SJVAir.com
-
Our widget can be easily embedded into a website by utilizing an
iframe
. You can use the iframe code below, which includes the recommended attributes and styles, replacing[ MONITOR_ID ]
with the desired monitor ID:
<iframe src="https://www.sjvair.com/widget/#/[ MONITOR_ID ]" frameborder="0" allowtransparency="true" style="overflow: hidden; width: 290px; height: 390px;"></iframe>
-
Follow the Getting Started section to verify the build is working locally, then run:
npm run build
The production ready bundles will be located under the
dist/
directory.
Working on this widget requires access to the SVJAir API. Make sure you have followed the setup guide for getting the sjvair.com development server up and running. These instructions assume you are using the default settings for the sjvair.com development server.
- Clone this repo and install the project dependencies:
git clone https://github.com/SJVAir/web-widget.git cd web-widget npm i
- Create your
.env
filecp .env.template .env
- Start the dev server:
npm run dev
VS Code + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
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:
- Disable the built-in TypeScript Extension
- Run
Extensions: Show Built-in Extensions
from VSCode's command palette - Find
TypeScript and JavaScript Language Features
, right click and selectDisable (Workspace)
- Run
- Reload the VSCode window by running
Developer: Reload Window
from the command palette.