- Node version 20.14.0
- NPM version 10.7.0
VSCode + Volar (and disable Vetur).
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 Volar to make the TypeScript language service aware of .vue
types.
See Vite Configuration Reference.
npm install
npm run dev
npm run build
Run Headed Component Tests with Cypress Component Testing
npm run test:unit:dev # or `npm run test:unit` for headless testing
Run End-to-End Tests with Cypress
npm run test:e2e:dev
This runs the end-to-end tests against the Vite development server. It is much faster than the production build.
But it's still recommended to test the production build with test:e2e
before deploying (e.g. in CI environments):
npm run build
npm run test:e2e
Lint with ESLint
npm run lint
Any changes to the TailwindCSS classes would need this command so the main CSS file is updated:
npx tailwindcss -i ./src/assets/base.css -o ./src/assets/main.css
Similar to the command above, but runs automatically once a file has been saved - saves having to keep repeating the command above during development:
npx tailwindcss -i ./src/assets/base.css -o ./src/assets/main.css --watch
- Build the project:
npm run build
-
Zip the resulting 'dist' folder.
-
Upload zipped folder to hosting service public access location (e.g., 'public_html'), then extract contents. Ensure the contents are no longer in the 'dist' folder.
-
OPTIONAL: It may be necessary to configure a .htaccess file so the website is properly configured (especially to account for routing pages).