Skip to content

Commit

Permalink
feat: adjust the directory structure and replace jest with vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
tomgao365 committed Dec 28, 2023
1 parent be346fa commit 01c3b9a
Show file tree
Hide file tree
Showing 12 changed files with 398 additions and 1,607 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ yarn add @tomjs/utils
# npm
npm i @tomjs/utils
```

## Documentation

- [API Documentation](https://paka.dev/npm/@tomjs/vite-plugin-html) provided by [paka.dev](https://paka.dev).
- [index.d.ts](https://www.unpkg.com/browse/@tomjs/vite-plugin-html/dist/index.d.ts) provided by [unpkg.com](https://www.unpkg.com).
5 changes: 5 additions & 0 deletions README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ yarn add @tomjs/utils
# npm
npm i @tomjs/utils
```

## 文档

- [paka.dev](https://paka.dev) 提供的 [API文档](https://paka.dev/npm/@tomjs/utils).
- [unpkg.com](https://www.unpkg.com/) 提供的 [index.d.ts](https://www.unpkg.com/browse/@tomjs/utils/dist/index.d.ts).
20 changes: 20 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>test</title>
<script src="./dist/index.global.js"></script>
<script>
console.log('uuid:', Tomjs.uuid())
console.log('uuid32:', Tomjs.uuid32())
console.log('uuid36:', Tomjs.uuid36())
</script>
</head>

<body>

</body>

</html>
7 changes: 0 additions & 7 deletions jest.config.cjs

This file was deleted.

12 changes: 3 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,37 +38,31 @@
"scripts": {
"dev": "tsup --watch",
"build": "tsup --minify",
"test": "jest",
"test": "vitest",
"lint": "run-s lint:eslint lint:prettier",
"lint:eslint": "eslint \"{src,scripts,test}/**/*.ts\" *.{js,cjs,ts} --fix --cache",
"lint:prettier": "prettier --write .",
"prepare": "husky install",
"prepublishOnly": "npm run build && np --any-branch --no-yarn --yolo --no-publish --message \"chore: release v%s\""
},
"dependencies": {
"kolorist": "^1.8.0"
},
"devDependencies": {
"@commitlint/cli": "^18.4.3",
"@jest/globals": "^29.7.0",
"@tomjs/commitlint": "^2.1.1",
"@tomjs/eslint": "^1.2.1",
"@tomjs/prettier": "^1.1.1",
"@tomjs/tsconfig": "^1.2.1",
"@types/jest": "^29.5.11",
"@types/node": "^18.19.3",
"cross-env": "^7.0.3",
"eslint": "^8.56.0",
"husky": "^8.0.3",
"jest": "^29.7.0",
"lint-staged": "^15.2.0",
"np": "^9.2.0",
"npm-run-all": "^4.1.5",
"prettier": "^3.1.1",
"rimraf": "^5.0.5",
"ts-jest": "^29.1.1",
"tsup": "^8.0.1",
"tsx": "^4.7.0",
"typescript": "~5.3.3"
"typescript": "~5.3.3",
"vitest": "^1.1.0"
}
}
Loading

0 comments on commit 01c3b9a

Please sign in to comment.