Skip to content

Commit 1ec0e05

Browse files
committed
chore: init
0 parents  commit 1ec0e05

38 files changed

+4830
-0
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
dist
3+
pnpm-lock.yaml
4+
!.*
5+
.history

.eslintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "@antfu"
3+
}

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: Simon-He95
2+
custom: ["https://github.com/Simon-He95/sponsor"]

.github/workflows/ci.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
pull_request:
9+
branches:
10+
- main
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Set node
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: 16.x
21+
22+
- name: Setup
23+
run: npm i -g @antfu/ni
24+
25+
- name: Install
26+
run: nci
27+
28+
- name: Lint
29+
run: nr lint
30+
31+
typecheck:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v3
35+
- name: Set node
36+
uses: actions/setup-node@v3
37+
with:
38+
node-version: 16.x
39+
40+
- name: Setup
41+
run: npm i -g @antfu/ni
42+
43+
- name: Install
44+
run: nci
45+
46+
- name: Typecheck
47+
run: nr typecheck
48+
49+
test:
50+
runs-on: ${{ matrix.os }}
51+
52+
strategy:
53+
matrix:
54+
node: [14.x, 16.x]
55+
os: [ubuntu-latest, windows-latest, macos-latest]
56+
fail-fast: false
57+
58+
steps:
59+
- uses: actions/checkout@v3
60+
- name: Set node ${{ matrix.node }}
61+
uses: actions/setup-node@v3
62+
with:
63+
node-version: ${{ matrix.node }}
64+
65+
- name: Setup
66+
run: npm i -g @antfu/ni
67+
68+
- name: Install
69+
run: nci
70+
71+
- name: Build
72+
run: nr build
73+
74+
- name: Test
75+
run: nr test

.github/workflows/release.yml

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

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
*.DS_Store
2+
node_modules
3+
*.log
4+
idea/
5+
*.local
6+
.DS_Store
7+
dist
8+
.cache
9+
.idea
10+
.history
11+
logs
12+
&-debug.log
13+
*-error.log
14+
.eslintcache
15+
tmp
16+

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ignore-workspace-root-check=true

.prettierignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
packages/*/CHANGELOG.md
2+
playground-temp/
3+
dist/
4+
temp/
5+
LICENSE.md
6+
pnpm-lock.yaml
7+
pnpm-workspace.yaml
8+
playground/tsconfig-json-load-error/has-error/tsconfig.json
9+
playground/html/invalid.html
10+
playground/html/valid.html
11+
playground/worker/classic-worker.js
12+
.history

.prettierrc.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"semi": false,
3+
"tabWidth": 2,
4+
"singleQuote": true,
5+
"printWidth": 80,
6+
"trailingComma": "all",
7+
"overrides": [
8+
{
9+
"files": ["*.json5"],
10+
"options": {
11+
"singleQuote": false,
12+
"quoteProps": "preserve"
13+
}
14+
},
15+
{
16+
"files": ["*.yml"],
17+
"options": {
18+
"singleQuote": false
19+
}
20+
}
21+
]
22+
}

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## starter-ts
2+
forked by [antfu/starter-ts](https://github.com/antfu/vitesse)
3+
4+
## GitHub Template
5+
[Create a repo from this template on GitHub.](https://github.com/Simon-He95/starter-ts/generate)
6+
7+
## Clone to local
8+
If you prefer to do it manually with the cleaner git history
9+
```
10+
npx degit Simon-He95/starter-ts my-starter-ts-app
11+
cd my-vitesse-app
12+
pnpm i # If you don't have pnpm installed, run: npm install -g pnpm
13+
```
14+
15+
16+
## License
17+
[MIT](./LICENSE) License © 2022 [Simon He](https://github.com/Simon-He95)
18+
19+
<a href="https://github.com/Simon-He95/sponsor" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" style="height: 51px !important;width: 217px !important;" ></a>
20+
21+
22+
<span><div align="center">![sponsors](https://www.hejian.club/images/sponsors.jpg)</div></span>

cli.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env node --no-warnings
2+
import('./dist/index.js')

license

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Simon He
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

package.json

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"name": "transformToUnocss",
3+
"type": "module",
4+
"version": "0.0.0",
5+
"packageManager": "[email protected]",
6+
"description": "",
7+
"author": "Simon He",
8+
"license": "MIT",
9+
"funding": "https://github.com/sponsors/Simon-He95",
10+
"homepage": "https://github.com/Simon-He95/transformToUnocss#readme",
11+
"repository": {
12+
"type": "git",
13+
"url": "git+https://github.com/Simon-He95/transformToUnocss.git"
14+
},
15+
"bugs": "https://github.com/Simon-He95/transformToUnocss/issues",
16+
"keywords": [],
17+
"sideEffects": false,
18+
"exports": {
19+
".": {
20+
"types": "./dist/index.d.ts",
21+
"require": "./dist/index.cjs",
22+
"import": "./dist/index.mjs"
23+
}
24+
},
25+
"main": "./dist/index.js",
26+
"module": "./dist/index.mjs",
27+
"types": "./dist/index.d.ts",
28+
"typesVersions": {
29+
"*": {
30+
"*": [
31+
"./dist/*",
32+
"./dist/index.d.ts"
33+
]
34+
}
35+
},
36+
"bin": {
37+
"run": "./cli.mjs"
38+
},
39+
"files": [
40+
"dist"
41+
],
42+
"scripts": {
43+
"preinstall": "npx only-allow pnpm",
44+
"postinstall": "simple-git-hooks",
45+
"build": "tsup ./src/index.ts --format cjs,esm --dts --clean --minify",
46+
"dev": "npm run build -- --watch src",
47+
"format": "prettier --write --cache .",
48+
"lint": "eslint . --ext .vue,.js,.ts,.jsx,.tsx,.md,.json --max-warnings 0 --cache",
49+
"lint:fix": "pnpm run lint --fix",
50+
"prepublishOnly": "nr build",
51+
"release": "bumpp && npm publish",
52+
"start": "esno src/index.ts",
53+
"test": "vitest",
54+
"typecheck": "tsc --noEmit"
55+
},
56+
"devDependencies": {
57+
"@antfu/eslint-config": "^0.25.1",
58+
"@types/node": "^18.0.0",
59+
"bumpp": "^8.2.1",
60+
"eslint": "^8.18.0",
61+
"esno": "^0.16.3",
62+
"lazy-js-utils": "^0.0.35",
63+
"lint-staged": "^13.1.0",
64+
"picocolors": "^1.0.0",
65+
"prettier": "^2.8.1",
66+
"rimraf": "^3.0.2",
67+
"simple-git-hooks": "^2.8.1",
68+
"tsup": "^6.5.0",
69+
"tsx": "^3.12.1",
70+
"typescript": "^4.7.4",
71+
"vitest": "^0.15.1"
72+
},
73+
"simple-git-hooks": {
74+
"pre-commit": "pnpm exec lint-staged --concurrent false",
75+
"commit-msg": "pnpm exec tsx scripts/verifyCommit.ts $1"
76+
},
77+
"lint-staged": {
78+
"*": [
79+
"prettier --write --cache --ignore-unknown"
80+
],
81+
"*.{vue,js,ts,jsx,tsx,md,json}": "eslint --fix"
82+
},
83+
"eslintConfig": {
84+
"extends": "@antfu"
85+
}
86+
}

0 commit comments

Comments
 (0)