Skip to content

Commit b460131

Browse files
committed
chore: init
0 parents  commit b460131

19 files changed

+5381
-0
lines changed

.editorconfig

+9
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

.github/FUNDING.yml

+2
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

+75
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

+22
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

+16
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

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ignore-workspace-root-check=true

.prettierignore

+12
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

+22
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

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Vitesse
2+
3+
## :coffee:
4+
5+
[buy me a cup of coffee](https://github.com/Simon-He95/sponsor)
6+
7+
## License
8+
9+
[MIT](./license)
10+
11+
## Sponsors
12+
13+
<p align="center">
14+
<a href="https://cdn.jsdelivr.net/gh/Simon-He95/sponsor/sponsors.svg">
15+
<img src="https://cdn.jsdelivr.net/gh/Simon-He95/sponsor/sponsors.png"/>
16+
</a>
17+
</p>

cli.mjs

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

eslint.config.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// @ts-check
2+
import antfu from '@antfu/eslint-config'
3+
4+
export default antfu(
5+
{
6+
ignores: [
7+
// eslint ignore globs here
8+
],
9+
},
10+
{
11+
rules: {
12+
// overrides
13+
},
14+
},
15+
)

license

+21
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

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"name": "@simon_he/fetch-npm",
3+
"type": "module",
4+
"version": "0.0.1",
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/fetch-npm#readme",
11+
"repository": {
12+
"type": "git",
13+
"url": "git+https://github.com/Simon-He95/fetch-npm.git"
14+
},
15+
"bugs": "https://github.com/Simon-He95/fetch-npm/issues",
16+
"keywords": [],
17+
"sideEffects": false,
18+
"exports": {
19+
".": {
20+
"types": "./dist/index.d.ts",
21+
"import": "./dist/index.js",
22+
"require": "./dist/index.cjs"
23+
}
24+
},
25+
"main": "./dist/index.js",
26+
"module": "./dist/index.js",
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+
"build": "tsup ./src/index.ts --format esm --dts --clean --minify",
44+
"dev": "npm run build -- --watch src",
45+
"format": "prettier --write --cache .",
46+
"lint": "eslint . --cache",
47+
"lint:fix": "pnpm run lint --fix",
48+
"prepublishOnly": "nr build",
49+
"release": "bumpp && npm publish",
50+
"start": "esno src/index.ts",
51+
"test": "vitest",
52+
"typecheck": "tsc --noEmit"
53+
},
54+
"devDependencies": {
55+
"@antfu/eslint-config": "^3.5.1",
56+
"@types/node": "^18.19.50",
57+
"bumpp": "^8.2.1",
58+
"eslint": "^9.10.0",
59+
"jiti": "^2.3.3",
60+
"lint-staged": "^13.3.0",
61+
"picocolors": "^1.1.0",
62+
"prettier": "^2.8.8",
63+
"rimraf": "^3.0.2",
64+
"tar": "^7.4.3",
65+
"tsup": "^6.7.0",
66+
"tsx": "^3.14.0",
67+
"typescript": "^4.9.5",
68+
"vitest": "^0.15.2"
69+
},
70+
"lint-staged": {
71+
"*": [
72+
"prettier --write --cache --ignore-unknown"
73+
],
74+
"*.{vue,js,ts,jsx,tsx,md,json}": "eslint --fix"
75+
}
76+
}

0 commit comments

Comments
 (0)