From e229d6699e80c63ba2207cdd41479d5fca722a7f Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Fri, 3 May 2024 12:03:35 -0400 Subject: [PATCH] Updated calcite version to 2.8.0 --- README.md | 8 +++++++- package.json | 2 +- src/index.html | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 650a8bb..e300bc7 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,14 @@ Template for creating prototypes with Stencil.js and Calcite compnents 1. clone repo to your developer machine 1. find and replace the string `REPLACE_PROJECT_NAME` with your project name, e.g. `hub-chatbot` 1. install dependencies `npm i` -1. copy Calcite assets `cp -r node_modules/@esri/calcite-components/dist/calcite/assets/* ./src/assets/` +1. copy Calcite assets `cp -r node_modules/@esri/calcite-components/dist/calcite/assets/* ./src/assets/`' 1. create new components with `npx stencil g` + - in the first component, import the Calcite assets + ```ts + import { setAssetPath } from "@esri/calcite-components/dist/components"; + setAssetPath("./assets"); + ``` + 1. modify `src/index.html` for your component name and any props. - the example `index.html` uses script to add component to DOM so you can pass complex objects and other dynamic props 1. run the server `npm run start` diff --git a/package.json b/package.json index d2ba6fd..55f755f 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "@types/node": "^18.14.0" }, "devDependencies": { - "@esri/calcite-components": "^1.2.0", + "@esri/calcite-components": "^2.8.0", "@stencil/sass": "^2.0.0", "@stencil/store": "^2.0.1" }, diff --git a/src/index.html b/src/index.html index 2f04c82..b9827f1 100644 --- a/src/index.html +++ b/src/index.html @@ -12,7 +12,7 @@