To install dependences, run:
npm install
npm run dev
npm run build
To install calcite components, first run:
npm install --save @esri/calcite-components
After Calcite Components is installed, import and call setAssetPath
to load the assets:
// src/main.js
import { setAssetPath } from '@esri/calcite-components/dist/components';
setAssetPath(location.href);
Import the Calcite Components when they are used:
// src/components/HelloWorld.vue
import '@esri/calcite-components/dist/components/calcite-button';
import '@esri/calcite-components/dist/components/calcite-icon';
import '@esri/calcite-components/dist/components/calcite-date-picker';
The global Calcite Components CSS can be added with a <style>
tag in HelloWorld.vue
:
<style src="@esri/calcite-components/dist/calcite/calcite.css"></style>
Static assets must be copied over to the public folder manually. A copy
script has been created to make this process easier:
npm run copy
This will copy the assets required by the components to your project's public/assets
directory.
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).