From 9ffa4e6a61320423faf11a2ddb7d6d7a73990460 Mon Sep 17 00:00:00 2001 From: pewillia Date: Wed, 18 Sep 2024 10:59:56 -0400 Subject: [PATCH] change readme instructions to run build and run preview (10) --- README.md | 10 ++++++---- package-lock.json | 4 ++-- package.json | 6 ++++-- vite.config.ts | 8 +++++++- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a07e6fd..ff93d11 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ It also includes the following; 1. Config Builder - This helps users build configuration files and test them via UI. Users can also start with existing configurations. 2. API Functions - This part of the application demonstrates how differents API functions work and how to use them. It provides code snippets of to invoke our API functions. +## [Demo](https://cphelefu.github.io/geoview-demo/) ## STRUCTURE / ARCHITECT The tech stack for this application includes the following frameworks or technologies; @@ -16,7 +17,7 @@ The tech stack for this application includes the following frameworks or technol ## Running The Project -First thing; we encourage you to folk the repo instead of cloning it - especially if you would like to contribute to it. +First thing; we encourage you to fork the repo instead of cloning it - especially if you would like to contribute to it. If not; you can do ahead and clone it. ### Cloning the repo @@ -24,10 +25,11 @@ If not; you can do ahead and clone it. ```git clone https://github.com/Canadian-Geospatial-Platform/geoview-demo.git``` ### Install the packages -``` npm run install``` - +``` npm install``` +### build the dist directory +``` npm run build``` ### Run the application -```npm run serve``` +```npm run dev``` ### Deploying to GitHub Pages ```npm run deploy``` diff --git a/package-lock.json b/package-lock.json index f2dabf2..8ae1f90 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "my-vue-app", + "name": "geoview-demo", "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "my-vue-app", + "name": "geoview-demo", "version": "0.0.0", "dependencies": { "@emotion/react": "^11.13.0", diff --git a/package.json b/package.json index 2bcfc60..f5861b0 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,13 @@ "type": "module", "scripts": { "dev": "vite", - "build": "tsc -b && vite build", + "build": "tsc -b && vite build --watch --config vite.config.ts", "lint": "eslint .", "preview": "vite preview", + "dev": "vite dev", "predeploy": "npm run build", - "deploy": "gh-pages -d dist" + "deploy": "gh-pages -d dist", + "start": "react-scripts start" }, "dependencies": { "@emotion/react": "^11.13.0", diff --git a/vite.config.ts b/vite.config.ts index 2038299..47e7f15 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,9 +5,15 @@ import react from '@vitejs/plugin-react'; export default defineConfig({ plugins: [react()], base: "/geoview-demo/", + resolve: { alias: { '@': '/src', }, -}, + }, + build: { + watch: { + // https://rollupjs.org/configuration-options/#watch + }, + } })