Skip to content

Commit

Permalink
chore: upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
zyyv committed Dec 20, 2023
1 parent f7c0b94 commit 647ece6
Show file tree
Hide file tree
Showing 13 changed files with 2,766 additions and 2,540 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
dist
node_modules
README.md
3 changes: 0 additions & 3 deletions .eslintrc

This file was deleted.

40 changes: 22 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,44 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x

- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 7.27.0
- name: Setup
run: npm i -g @antfu/ni

- name: Install
run: pnpm install
run: nci

- name: Lint
run: pnpm lint
run: nr lint

test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

strategy:
matrix:
node: [20.x, 18.x]
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false

steps:
- uses: actions/checkout@v3

- name: Set node
- name: Set node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: ${{ matrix.node }}

- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 7.27.0
- name: Setup
run: npm i -g @antfu/ni

- name: Install
run: pnpm install
run: nci

- name: Build
run: nr build

- name: Test
run: pnpm test
run: nr test
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ignore-workspace-root-check=true
shamefully-hoist=true
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"editor.formatOnSave": false
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Will be transformed to:
<div px-2 py-3 bg-blue-500 text-white rounded>
<div class="px-2 py-3 bg-blue-500 text-white rounded bg-red4:10 text-red5 rounded" />
<div class="btn-blue px-2 py-3 bg-blue-500 text-white rounded bg-blue4:10 text-blue5 rounded" />
```
```

## Options

Expand All @@ -52,6 +52,7 @@ transformerAlias({
* @default "*"
*/
prefix?: string

/**
* Prefix for your alias and keep the original class.
*
Expand Down Expand Up @@ -81,7 +82,6 @@ interface KeepOption {
- [UnoCSS Issue #2543](https://github.com/unocss/unocss/issues/2543)
- [WindiCSS Alias Config](https://windicss.org/integrations/vite.html#alias-config)


## License

MIT License &copy; 2023-PRESENT [Chris](https://github.com/zyyv)
5 changes: 5 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import antfu from '@antfu/eslint-config'

export default antfu({
ignores: ['README.md'],
})
33 changes: 17 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@
"url": "https://github.com/zyyv/unocss-transformer-alias/issues"
},
"keywords": [
"UnoCSS",
"UnoCSS transformer"
"unpreset",
"unocss",
"unocss transformer"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.cjs",
Expand Down Expand Up @@ -51,19 +52,19 @@
"play": "npm -C playground run dev"
},
"dependencies": {
"@unocss/core": "^0.51.8"
"@unocss/core": "^0.58.0"
},
"devDependencies": {
"@antfu/eslint-config": "^0.38.5",
"@babel/types": "^7.21.5",
"@types/node": "^18.16.2",
"bumpp": "^9.1.0",
"eslint": "^8.39.0",
"esno": "^0.16.3",
"magic-string": "^0.30.0",
"typescript": "^5.0.4",
"unbuild": "^1.2.1",
"vite": "^4.3.3",
"vitest": "^0.30.1"
"@antfu/eslint-config": "^2.4.6",
"@babel/types": "^7.23.6",
"@types/node": "^20.10.5",
"bumpp": "^9.2.1",
"eslint": "^8.55.0",
"esno": "^4.0.0",
"magic-string": "^0.30.5",
"typescript": "^5.3.3",
"unbuild": "^2.0.0",
"vite": "^5.0.10",
"vitest": "^1.1.0"
}
}
12 changes: 6 additions & 6 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.2.47"
"vue": "^3.3.13"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.1.0",
"typescript": "^5.0.2",
"unocss": "^0.51.8",
"@vitejs/plugin-vue": "^4.5.2",
"typescript": "^5.3.3",
"unocss": "^0.58.0",
"unocss-transformer-alias": "workspace:*",
"vite": "^4.3.2",
"vue-tsc": "^1.4.2"
"vite": "^5.0.10",
"vue-tsc": "^1.8.25"
}
}
8 changes: 4 additions & 4 deletions playground/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"compilerOptions": {
"target": "ESNext",
"jsx": "preserve",
"lib": ["ESNext", "DOM"],
"useDefineForClassFields": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"strict": true,
"jsx": "preserve",
"sourceMap": true,
"resolveJsonModule": true,
"isolatedModules": true,
"esModuleInterop": true,
"lib": ["ESNext", "DOM"],
"isolatedModules": true,
"skipLibCheck": true
}
}
Loading

0 comments on commit 647ece6

Please sign in to comment.