Skip to content

Commit

Permalink
chore: updated dependencies with vite & vitest configs
Browse files Browse the repository at this point in the history
  • Loading branch information
brifiction committed Oct 12, 2024
1 parent c27a78c commit 3420266
Show file tree
Hide file tree
Showing 9 changed files with 6,877 additions and 3,045 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,11 @@ coverage
# Others
_docs
stats.html

# yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
6 changes: 1 addition & 5 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn build
yarn prettier
yarn test
925 changes: 925 additions & 0 deletions .yarn/releases/yarn-4.5.0.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.5.0.cjs
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
<img alt="github stars" src="https://img.shields.io/github/stars/entwurfhaus/vite-vanilla-ts-module?style=flat-square" />
<img alt="GitHub Workflow Status (with event)" src="https://img.shields.io/github/actions/workflow/status/entwurfhaus/vite-vanilla-ts-module/develop.yml?style=flat-square" />
<img alt="documentation" src="https://img.shields.io/website?label=documentation&style=flat-square&up_message=online&url=https://vite-vanilla-ts-template-extended.vercel.app">
<img alt="visits" src="https://hits.deltapapa.io/github/entwurfhaus/vite-vanilla-ts-module.svg" />
</p>

<p align="center">
<img alt="bundlephobia" src="https://img.shields.io/bundlephobia/min/entwurfhaus/vite-vanilla-ts-module?style=flat-square" />
<img alt="vulnerabilities" src="https://img.shields.io/snyk/vulnerabilities/github/entwurfhaus/vite-vanilla-ts-module?style=flat-square" />
</p>

> Update: If you prefer a minimalist vite-vanilla-ts-template, check out https://github.com/entwurfhaus/vite-vanilla-ts-template.
A starter `vanilla-ts` (extended) template that began with Vite 3.x, prepared for writing `node` utility libraries in `typescript`. This starter is meant to provide rapid `node` package development and publishing onto `npm`.

![yarn build](_screenshots/2022-06-04_12-01-14.jpg "yarn build")
Expand Down Expand Up @@ -78,9 +79,7 @@ echo "export default { extends: ["@commitlint/config-conventional"] };" > commit

## Testing with Vitest

Run `yarn test:run` or `yarn test:coverage` to produce code coverage report.

![yarn test:run](_screenshots/2022-06-04_12-03-10.jpg "yarn test:run")
Run `yarn test` or `yarn test:coverage` to produce code coverage report.

The code coverage report will indicate, if all test cases are 100% covered, flawed logic and so on.

Expand Down
35 changes: 19 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,42 @@
"build": "vite build && typedoc",
"build:watch": "vite build --watch && typedoc",
"dev": "vite && typedoc",
"prepare": "husky install",
"lint": "eslint src",
"prepare": "husky",
"prettier": "prettier --write .",
"preview": "vite preview",
"test": "vitest run",
"test:ui": "vitest --ui --coverage",
"test:coverage": "vitest run --coverage",
"test:run": "vitest run",
"test:watch": "vitest"
},
"dependencies": {
"@microsoft/tsdoc": "^0.14.1",
"picocolors": "^1.0.1"
"@microsoft/tsdoc": "^0.14.2",
"picocolors": "^1.1.0"
},
"devDependencies": {
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@nabla/vite-plugin-eslint": "^2.0.4",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/node": "^20.12.12",
"@typescript-eslint/eslint-plugin": "^7.9.0",
"@typescript-eslint/parser": "^7.9.0",
"@types/node": "^20.16.11",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/ui": "^1.6.0",
"eslint": "^9.2.0",
"husky": "^9.0.11",
"eslint": "^9.12.0",
"globals": "^15.11.0",
"husky": "^9.1.6",
"prettier": "3.2.5",
"rollup-plugin-visualizer": "^5.12.0",
"tslib": "^2.4.0",
"typedoc": "^0.25.13",
"typescript": "^5.4.5",
"vite": "^5.2.11",
"tslib": "^2.7.0",
"typedoc": "^0.26.9",
"typescript": "^5.6.3",
"vite": "^5.4.8",
"vite-plugin-dts": "^3.9.1",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-progress": "^0.0.7",
"vitest": "^1.6.0"
}
},
"packageManager": "[email protected]"
}
5 changes: 3 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// import eslint from "vite-plugin-eslint"; // this is currently not working :( turn this back on when it's fixed
import eslintPlugin from "@nabla/vite-plugin-eslint";
import path from "path";
import colors from "picocolors";
// import colors from "picocolors";
import { visualizer } from "rollup-plugin-visualizer";
import { type PluginOption, defineConfig } from "vite";
import dts from "vite-plugin-dts";
import progress from "vite-plugin-progress";

// import progress from "vite-plugin-progress";

// https://vitejs.dev/config/
export default defineConfig({
Expand Down
1 change: 1 addition & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default defineConfig({
"_docs",
"src/main.ts",
"commitlint.config.js",
".yarn",
],
},
},
Expand Down
Loading

0 comments on commit 3420266

Please sign in to comment.