From 1e000fb841711352922a654cd10f438335ad846c 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 | 9 +++++---- package-lock.json | 4 ++-- package.json | 6 ++++-- vite.config.ts | 8 +++++++- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a07e6fd..4d05180 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,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 +24,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 + }, + } })