Skip to content

Commit 9ddae30

Browse files
committed
feat: init
0 parents  commit 9ddae30

31 files changed

+5729
-0
lines changed

.editorconfig

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
root = true
2+
3+
[*]
4+
indent_size = 2
5+
end_of_line = lf
6+
insert_final_newline = true

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: sxzz

.github/renovate.json5

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
extends: ['github>sxzz/renovate-config'],
3+
automerge: true,
4+
}

.github/workflows/release.yml

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

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Unit Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install pnpm
16+
uses: pnpm/[email protected]
17+
18+
- name: Set node
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: lts/*
22+
cache: pnpm
23+
24+
- name: Install
25+
run: pnpm i
26+
27+
- name: Lint
28+
run: pnpm run lint
29+
30+
- name: Typecheck
31+
run: pnpm run typecheck
32+
33+
test:
34+
runs-on: ${{ matrix.os }}
35+
36+
strategy:
37+
matrix:
38+
os: [ubuntu-latest, windows-latest]
39+
node: [18, 20, 22]
40+
fail-fast: false
41+
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- name: Install pnpm
46+
uses: pnpm/[email protected]
47+
48+
- name: Set node ${{ matrix.node }}
49+
uses: actions/setup-node@v4
50+
with:
51+
node-version: ${{ matrix.node }}
52+
cache: pnpm
53+
54+
- name: Install dependencies
55+
run: pnpm i
56+
57+
- name: Build
58+
run: pnpm run build
59+
60+
- name: Test
61+
run: pnpm run test

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
*.log
5+
.vercel
6+
.eslintcache
7+
tests/temp/*
8+
9+
!**/.gitkeep

.vscode/settings.json

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

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright © 2024-PRESENT 三咲智子 (https://github.com/sxzz)
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.

README.md

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# unplugin-quansync [![npm](https://img.shields.io/npm/v/unplugin-quansync.svg)](https://npmjs.com/package/unplugin-quansync)
2+
3+
[![Unit Test](https://github.com/unplugin/unplugin-quansync/actions/workflows/unit-test.yml/badge.svg)](https://github.com/unplugin/unplugin-quansync/actions/workflows/unit-test.yml)
4+
5+
undefined
6+
7+
8+
9+
## Installation
10+
11+
```bash
12+
npm i -D unplugin-quansync
13+
```
14+
15+
<details>
16+
<summary>Vite</summary><br>
17+
18+
```ts
19+
// vite.config.ts
20+
import Quansync from 'unplugin-quansync/vite'
21+
22+
export default defineConfig({
23+
plugins: [Quansync()],
24+
})
25+
```
26+
27+
<br></details>
28+
29+
<details>
30+
<summary>Rollup</summary><br>
31+
32+
```ts
33+
// rollup.config.js
34+
import Quansync from 'unplugin-quansync/rollup'
35+
36+
export default {
37+
plugins: [Quansync()],
38+
}
39+
```
40+
41+
<br></details>
42+
43+
<details>
44+
<summary>Rolldown</summary><br>
45+
46+
```ts
47+
// rolldown.config.js
48+
import Quansync from 'unplugin-quansync/rolldown'
49+
50+
export default {
51+
plugins: [Quansync()],
52+
}
53+
```
54+
55+
<br></details>
56+
57+
<details>
58+
<summary>esbuild</summary><br>
59+
60+
```ts
61+
import { build } from 'esbuild'
62+
import Quansync from 'unplugin-quansync/esbuild'
63+
64+
build({
65+
plugins: [Quansync()],
66+
})
67+
```
68+
69+
<br></details>
70+
71+
<details>
72+
<summary>Webpack</summary><br>
73+
74+
```js
75+
// webpack.config.js
76+
import Quansync from 'unplugin-quansync/webpack'
77+
78+
export default {
79+
/* ... */
80+
plugins: [Quansync()],
81+
}
82+
```
83+
84+
<br></details>
85+
86+
<details>
87+
<summary>Rspack</summary><br>
88+
89+
```ts
90+
// rspack.config.js
91+
import Quansync from 'unplugin-quansync/rspack'
92+
93+
export default {
94+
/* ... */
95+
plugins: [Quansync()],
96+
}
97+
```
98+
99+
<br></details>
100+
101+
## Sponsors
102+
103+
<p align="center">
104+
<a href="https://cdn.jsdelivr.net/gh/sxzz/sponsors/sponsors.svg">
105+
<img src='https://cdn.jsdelivr.net/gh/sxzz/sponsors/sponsors.svg'/>
106+
</a>
107+
</p>
108+
109+
## License
110+
111+
[MIT](./LICENSE) License © 2025-PRESENT [三咲智子](https://github.com/sxzz)

eslint.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import { sxzz } from '@sxzz/eslint-config'
2+
export default sxzz()

package.json

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
"name": "unplugin-quansync",
3+
"version": "0.0.0",
4+
"packageManager": "[email protected]",
5+
"description": "undefined",
6+
"type": "module",
7+
"keywords": [
8+
"unplugin",
9+
"vite",
10+
"webpack",
11+
"rspack",
12+
"rollup",
13+
"rolldown",
14+
"esbuild",
15+
"farm"
16+
],
17+
"license": "MIT",
18+
"homepage": "https://github.com/unplugin/unplugin-quansync#readme",
19+
"bugs": {
20+
"url": "https://github.com/unplugin/unplugin-quansync/issues"
21+
},
22+
"repository": {
23+
"type": "git",
24+
"url": "git+https://github.com/unplugin/unplugin-quansync.git"
25+
},
26+
"author": "三咲智子 Kevin Deng <[email protected]>",
27+
"funding": "https://github.com/sponsors/sxzz",
28+
"files": [
29+
"dist"
30+
],
31+
"main": "./dist/index.js",
32+
"module": "./dist/index.js",
33+
"types": "./dist/index.d.ts",
34+
"exports": {
35+
".": "./dist/index.js",
36+
"./vite": "./dist/vite.js",
37+
"./webpack": "./dist/webpack.js",
38+
"./rspack": "./dist/rspack.js",
39+
"./rollup": "./dist/rollup.js",
40+
"./rolldown": "./dist/rolldown.js",
41+
"./esbuild": "./dist/esbuild.js",
42+
"./farm": "./dist/farm.js",
43+
"./api": "./dist/api.js",
44+
"./*": "./*"
45+
},
46+
"typesVersions": {
47+
"*": {
48+
"*": [
49+
"./dist/*",
50+
"./*"
51+
]
52+
}
53+
},
54+
"publishConfig": {
55+
"access": "public"
56+
},
57+
"scripts": {
58+
"lint": "eslint --cache .",
59+
"lint:fix": "pnpm run lint --fix",
60+
"build": "tsdown",
61+
"dev": "tsdown --watch",
62+
"test": "vitest",
63+
"typecheck": "tsc --noEmit",
64+
"release": "bumpp && pnpm publish",
65+
"prepublishOnly": "pnpm run build"
66+
},
67+
"dependencies": {
68+
"ast-kit": "^1.4.0",
69+
"magic-string-ast": "^0.7.0",
70+
"quansync": "^0.0.5",
71+
"unplugin": "^2.2.0",
72+
"unplugin-utils": "^0.2.4"
73+
},
74+
"devDependencies": {
75+
"@babel/types": "^7.26.9",
76+
"@sxzz/eslint-config": "^5.1.1",
77+
"@sxzz/prettier-config": "^2.2.0",
78+
"@sxzz/test-utils": "^0.5.1",
79+
"@types/node": "^22.13.5",
80+
"bumpp": "^10.0.3",
81+
"eslint": "^9.21.0",
82+
"oxc-transform": "^0.52.0",
83+
"prettier": "^3.5.2",
84+
"tsdown": "^0.6.0",
85+
"tsx": "^4.19.3",
86+
"typescript": "^5.7.3",
87+
"vite": "^6.1.1",
88+
"vitest": "^3.0.6"
89+
},
90+
"engines": {
91+
"node": ">=18.12.0"
92+
},
93+
"prettier": "@sxzz/prettier-config"
94+
}

0 commit comments

Comments
 (0)