Skip to content

acfatah/vite-javascript

Repository files navigation

Vite ES Module Example

GitHub GitHub last commit (by committer)

Use vite-node as the Javascript runtime. Read more.

This repository serves as a template, and I will rebase it over time to make updates as needed.

Features

  • Uses Vitest for testing
  • Uses ESLint with Antfu's config
  • Uses Release-it for releasing

Usage

To start a new project, run

degit acfatah/vite-javascript your_project

After that, install the dependencies and initialize a new git repository by running the following command.

npm install && git init

Development

To start development mode using vitest, run

npm run dev

Execution

To run the program, use the npm run start command or simple press F5 in vscode.

To run vite-node directly using bash, run the command bin/run. You may need to install vite-node globally.

Build

To build the source to be compatible with nodejs v14, run npm run build. The source will be built in dist directory. The script can be executed by running node dist/main.js.

Usage Checklist

  • Update relevant information in package.json
  • Update vite.config.js
  • Update LICENCE
  • Update README.md
  • Initialize new git repository

Available Commands

Command Action
npm install Installs dependencies
npm run start Run the code
npm run dev Starts development mode
npm run build Transpile code to ./dist/ directory
npm run lint Run code linter on the project directory
npm run lint:fix Apply available code fixes using the linter
npm run test Run test once with code coverage analysis
npm run update Update dependencies according to semver
npm run release Release the code on npm

About

Use vite-node as the Javascript runtime.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published