Skip to content

Commit 12b89a3

Browse files
committed
init
0 parents  commit 12b89a3

14 files changed

Lines changed: 2048 additions & 0 deletions

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Release
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
tags:
9+
- 'v*'
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Set node
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: lts/*
23+
24+
- run: npx changelogithub
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/unit-test.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Unit Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Install pnpm
17+
uses: pnpm/action-setup@v4.1.0
18+
19+
- name: Set node LTS
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: lts/*
23+
cache: pnpm
24+
25+
- name: Install
26+
run: pnpm install
27+
28+
- name: Build
29+
run: pnpm run build
30+
31+
- name: Lint
32+
run: pnpm run lint
33+
34+
- name: Typecheck
35+
run: pnpm run typecheck
36+
37+
- name: Test
38+
run: pnpm run test

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
*.log
4+
.DS_Store

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"semi": false
4+
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"editor.formatOnSave": true
3+
}

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# @shilong/utils
2+
3+
Common utils and configuration

package.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "@shilong/utils",
3+
"version": "0.0.0",
4+
"description": "Common utils and configuration",
5+
"keywords": [
6+
"utils",
7+
"httpstatus"
8+
],
9+
"type": "module",
10+
"license": "MIT",
11+
"homepage": "https://github.com/Onlylonger/utils#readme",
12+
"bugs": {
13+
"url": "https://github.com/Onlylonger/utils/issues"
14+
},
15+
"repository": {
16+
"type": "git",
17+
"url": "git+https://github.com/Onlylonger/utils.git"
18+
},
19+
"author": "Barry <onlylonger@outlook.com>",
20+
"files": [
21+
"dist"
22+
],
23+
"main": "./dist/index.js",
24+
"module": "./dist/index.js",
25+
"types": "./dist/index.d.ts",
26+
"exports": {
27+
".": "./dist/index.js",
28+
"./package.json": "./package.json"
29+
},
30+
"publishConfig": {
31+
"access": "public"
32+
},
33+
"scripts": {
34+
"build": "tsdown",
35+
"dev": "tsdown --watch",
36+
"test": "vitest",
37+
"typecheck": "tsc --noEmit",
38+
"release": "bumpp && npm publish"
39+
},
40+
"devDependencies": {
41+
"@types/node": "^22.15.17",
42+
"bumpp": "^10.1.0",
43+
"tsdown": "^0.13.1",
44+
"typescript": "^5.8.3",
45+
"vitest": "^3.1.3"
46+
}
47+
}

0 commit comments

Comments
 (0)