Before you get started, you will need to have the following tools installed on your machine:
This repository includes a list of suggested VS Code extensions. It's a good idea to use VS Code and accept its suggestion to install them, as they'll help with development.
After you have set the environmental variables in the .env
file, you can
run the project locally by
git clone https://github.com/timelessco/vite-vanilla-js
cd vite-vanilla-js
pnpm install
This will download and install all the required dependencies for the project.
The project uses environmental variables for configuration. You can set the
environmental variables in a .env
file in the root directory of the
project.
GITHUB_TOKEN
(required: The GitHub token for releasing the project).
pnpm dev
To build the project to a production environment, you can use the
pnpm build
Run the above built application locally using
pnpm preview
Check for all the below errors in one command
pnpm lint
AutoFix all the linting errors in one command
pnpm fix
ESLint: Checks and formats all the files
Check for the linting errors
pnpm lint:eslint
AutoFix the linting errors
pnpm fix:eslint
Stylelint: Checks all css files
Check the css linting errors
pnpm lint:css
AutoFix the css linting errors
pnpm fix:css
knip: Checks all unused dependencies, exports & types
Check the spelling errors
pnpm lint:knip
cspell: Spell checks across all source files
Check the spelling errors
pnpm lint:spelling
pnpm dedupe --check: Lints the pnpm-lock.yml
file
Check for unnecessarily duplicated packages
pnpm lint:packages