Skip to content

Files

Latest commit

 

History

History
128 lines (79 loc) · 2.77 KB

DEVELOPMENT.md

File metadata and controls

128 lines (79 loc) · 2.77 KB

Development

Table of Contents

Prerequisites

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.

Installing the dependencies

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.

Configuration

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).

Running the project locally

pnpm dev

Building the project

To build the project to a production environment, you can use the

pnpm build

Run the above built application locally using

pnpm preview

More DX scripts

Check for all the below errors in one command

pnpm lint

AutoFix all the linting errors in one command

pnpm fix

Eslint

ESLint: Checks and formats all the files

Check for the linting errors

pnpm lint:eslint

AutoFix the linting errors

pnpm fix:eslint

Stylelint

Stylelint: Checks all css files

Check the css linting errors

pnpm lint:css

AutoFix the css linting errors

pnpm fix:css

Knip

knip: Checks all unused dependencies, exports & types

Check the spelling errors

pnpm lint:knip

Cspell

cspell: Spell checks across all source files

Check the spelling errors

pnpm lint:spelling

PNPM Dedupe

pnpm dedupe --check: Lints the pnpm-lock.yml file

Check for unnecessarily duplicated packages

  • pnpm lint:packages