Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into refactor/core/config
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunqing committed Mar 26, 2023
2 parents a1c7f7c + 339f2b2 commit fb53d79
Show file tree
Hide file tree
Showing 153 changed files with 2,532 additions and 1,213 deletions.
8 changes: 8 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@
"no-restricted-imports": "off"
}
},
{
"files": [
"packages/vscode/**/*.*"
],
"rules": {
"unicorn/prefer-node-protocol": "off"
}
},
{
"files": [
"**/*.md/*.*"
Expand Down
4 changes: 2 additions & 2 deletions .tazerc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"codemirror",
"@vue/cli-plugin-babel",
"@vue/cli-service",
"rollup",
"unbuild"
"unbuild",
"msw"
],
"packageMode": {
"vue": "minor",
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ Presets are the heart of UnoCSS. They let you make your own custom framework in
- [unocss-preset-autoprefixer](https://github.com/zouhangwithsweet/unocss-preset-autoprefixer) - Autoprefixer Preset by [@zouhang](https://github.com/zouhangwithsweet).
- [unocss-preset-scrollbar-hide](https://github.com/reslear/unocss-preset-scrollbar-hide) - Hide scrollbars, although the element can still be scrolled by [@reslear](https://github.com/reslear).
- [unocss-preset-radix](https://github.com/endigma/unocss-preset-radix) - Use the Radix UI color palette with UnoCSS by [@endigma](https://github.com/endigma)
- [unocss-preset-glyph](https://github.com/chu121su12/unocss-preset-glyph) - Embed subset of glyphs from fonts by [@chu121su12](https://github.com/chu121su12).

###### Community Frameworks

Expand Down Expand Up @@ -585,7 +586,7 @@ If you are seaking for the true dynamic generation at the runtime, you may check

### Inspector

From v0.7.0, our Vite plugin now ships with a dev inspector ([@unocss/inspector](https://github.com/unocss/unocss/tree/main/packages/inspector)) for you to view, play and analyse your custom rules and setup. Visit `http://localhost:3000/__unocss` in your Vite dev server to see it.
From v0.7.0, our Vite plugin now ships with a dev inspector ([@unocss/inspector](https://github.com/unocss/unocss/tree/main/packages/inspector)) for you to view, play and analyse your custom rules and setup. Visit `http://localhost:5173/__unocss` in your Vite dev server to see it.

<img src="https://user-images.githubusercontent.com/11247099/140885990-1827f5ce-f12a-4ed4-9d63-e5145a65fb4a.png">

Expand Down
2 changes: 1 addition & 1 deletion alias.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { resolve } from 'path'
import { resolve } from 'node:path'

const r = (p: string) => resolve(__dirname, p)

Expand Down
6 changes: 3 additions & 3 deletions bench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
},
"devDependencies": {
"@unocss/vite": "workspace:*",
"@vitejs/plugin-vue": "^4.0.0",
"autoprefixer": "^10.4.13",
"@vitejs/plugin-vue": "^4.1.0",
"autoprefixer": "^10.4.14",
"fs-extra": "^11.1.0",
"local-pkg": "^0.4.3",
"postcss": "^8.4.21",
"tailwindcss": "^3.2.7",
"unocss": "workspace:*",
"vite": "^4.1.4",
"vite": "^4.2.0",
"vite-plugin-windicss": "^1.8.10",
"vue": "^3.2.47",
"windicss": "^3.5.6"
Expand Down
4 changes: 2 additions & 2 deletions examples/astro-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"vue": "^3.2.47"
},
"devDependencies": {
"@astrojs/vue": "^2.0.1",
"astro": "^2.0.16",
"@astrojs/vue": "^2.1.0",
"astro": "^2.1.3",
"unocss": "link:../../packages/unocss"
}
}
2 changes: 1 addition & 1 deletion examples/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"astro": "astro"
},
"devDependencies": {
"astro": "^2.0.16",
"astro": "^2.1.3",
"unocss": "link:../../packages/unocss"
}
}
8 changes: 4 additions & 4 deletions examples/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
"lint": "next lint"
},
"dependencies": {
"next": "13.2.3",
"next": "13.2.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"unocss-nextjs": "link:"
},
"devDependencies": {
"@iconify-json/carbon": "^1.1.16",
"@types/node": "18.14.2",
"@types/node": "18.15.3",
"@types/react": "18.0.28",
"@types/react-dom": "18.0.11",
"@unocss/preset-attributify": "link:../../packages/preset-attributify",
"@unocss/reset": "link:../../packages/reset",
"@unocss/webpack": "link:../../packages/webpack",
"eslint": "8.35.0",
"eslint-config-next": "13.2.3",
"eslint": "8.36.0",
"eslint-config-next": "13.2.4",
"typescript": "4.9.5",
"unocss": "link:../../packages/unocss"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/nuxt3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@unocss/core": "link:../../packages/core",
"@unocss/nuxt": "link:../../packages/nuxt",
"@unocss/reset": "link:../../packages/reset",
"nuxt": "^3.2.3",
"nuxt": "^3.3.1",
"unocss": "link:../../packages/unocss"
}
}
2 changes: 1 addition & 1 deletion examples/quasar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"devDependencies": {
"@quasar/app-vite": "^1.2.1",
"autoprefixer": "^10.4.13",
"autoprefixer": "^10.4.14",
"typescript": "^4.9.5",
"unocss": "link:../../packages/unocss"
}
Expand Down
6 changes: 3 additions & 3 deletions examples/qwik/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
"qwik": "qwik"
},
"devDependencies": {
"@builder.io/qwik": "0.20.1",
"@builder.io/qwik-city": "0.5.2",
"@builder.io/qwik": "0.21.0",
"@builder.io/qwik-city": "0.6.1",
"@types/node": "latest",
"@unocss/reset": "link:../../packages/reset",
"typescript": "^4.9.5",
"unocss": "link:../../packages/unocss",
"vite": "4.1.4"
"vite": "4.2.0"
}
}
8 changes: 4 additions & 4 deletions examples/remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
"start": "remix-serve build"
},
"dependencies": {
"@remix-run/react": "^1.14.0",
"@remix-run/serve": "^1.14.0",
"@remix-run/react": "^1.14.3",
"@remix-run/serve": "^1.14.3",
"@unocss/reset": "link:../../packages/reset",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"remix": "^1.14.0"
"remix": "^1.14.3"
},
"devDependencies": {
"@remix-run/dev": "^1.14.0",
"@remix-run/dev": "^1.14.3",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"@unocss/cli": "link:../../packages/cli",
Expand Down
8 changes: 4 additions & 4 deletions examples/sveltekit-scoped/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"@sveltejs/kit": "next",
"@unocss/core": "link:../../packages/core",
"@unocss/preset-icons": "link:../../packages/preset-icons",
"svelte": "^3.55.1",
"svelte-check": "^3.0.4",
"svelte-preprocess": "^5.0.1",
"svelte": "^3.57.0",
"svelte-check": "^3.1.4",
"svelte-preprocess": "^5.0.2",
"tslib": "^2.5.0",
"typescript": "^4.9.5",
"unocss": "link:../../packages/unocss",
"vite": "^4.1.4"
"vite": "^4.2.0"
},
"stackblitz": {
"installDependencies": false,
Expand Down
2 changes: 1 addition & 1 deletion examples/sveltekit-scoped/remove-links.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { promises as fsPromises } from 'fs'
import { promises as fsPromises } from 'node:fs'

async function replaceInFile(filename, replacement) {
try {
Expand Down
10 changes: 5 additions & 5 deletions examples/sveltekit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
},
"devDependencies": {
"@iconify-json/logos": "^1.1.23",
"@iconify/utils": "^2.1.4",
"@iconify/utils": "^2.1.5",
"@sveltejs/adapter-auto": "next",
"@sveltejs/kit": "next",
"@unocss/core": "link:../../packages/core",
"@unocss/preset-icons": "link:../../packages/preset-icons",
"svelte": "^3.55.1",
"svelte-check": "^3.0.4",
"svelte-preprocess": "^5.0.1",
"svelte": "^3.57.0",
"svelte-check": "^3.1.4",
"svelte-preprocess": "^5.0.2",
"tslib": "^2.5.0",
"typescript": "^4.9.5",
"unocss": "link:../../packages/unocss",
"vite": "4.1.4"
"vite": "4.2.0"
},
"stackblitz": {
"installDependencies": false,
Expand Down
2 changes: 1 addition & 1 deletion examples/sveltekit/remove-links.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { promises as fsPromises } from 'fs'
import { promises as fsPromises } from 'node:fs'

async function replaceInFile(filename, replacement) {
try {
Expand Down
4 changes: 2 additions & 2 deletions examples/vite-elm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"@unocss/core": "link:../../packages/core",
"@unocss/preset-icons": "link:../../packages/preset-icons",
"@unocss/preset-uno": "link:../../packages/preset-uno",
"elm-tooling": "^1.12.0",
"elm-tooling": "^1.13.1",
"unocss": "link:../../packages/unocss",
"vite": "^4.1.4",
"vite": "^4.2.0",
"vite-plugin-elm": "^2.7.2"
}
}
4 changes: 2 additions & 2 deletions examples/vite-lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@unocss/preset-icons": "link:../../packages/preset-icons",
"typescript": "^4.9.5",
"unocss": "link:../../packages/unocss",
"vite": "^4.1.4",
"vite-plugin-inspect": "^0.7.15"
"vite": "^4.2.0",
"vite-plugin-inspect": "^0.7.17"
}
}
4 changes: 2 additions & 2 deletions examples/vite-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
"preact": "^10.13.0"
"preact": "^10.13.1"
},
"devDependencies": {
"@iconify-json/logos": "^1.1.23",
Expand All @@ -21,6 +21,6 @@
"cross-env": "^7.0.3",
"typescript": "^4.9.5",
"unocss": "link:../../packages/unocss",
"vite": "^4.1.4"
"vite": "^4.2.0"
}
}
2 changes: 1 addition & 1 deletion examples/vite-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"cross-env": "^7.0.3",
"typescript": "^4.9.5",
"unocss": "link:../../packages/unocss",
"vite": "^4.1.4"
"vite": "^4.2.0"
}
}
6 changes: 3 additions & 3 deletions examples/vite-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"serve": "vite preview"
},
"dependencies": {
"solid-js": "^1.6.11"
"solid-js": "^1.6.14"
},
"devDependencies": {
"@iconify-json/logos": "^1.1.23",
Expand All @@ -17,7 +17,7 @@
"@unocss/preset-icons": "link:../../packages/preset-icons",
"typescript": "^4.9.5",
"unocss": "link:../../packages/unocss",
"vite": "^4.1.4",
"vite-plugin-solid": "^2.6.0"
"vite": "^4.2.0",
"vite-plugin-solid": "^2.6.1"
}
}
1 change: 1 addition & 0 deletions examples/vite-svelte-postcss/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shamefully-hoist=true
12 changes: 12 additions & 0 deletions examples/vite-svelte-postcss/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Svelte + TS + Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
23 changes: 23 additions & 0 deletions examples/vite-svelte-postcss/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "unocss-svelte-ts",
"type": "module",
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json"
},
"devDependencies": {
"@iconify-json/logos": "^1.1.23",
"@sveltejs/vite-plugin-svelte": "^2.0.3",
"@tsconfig/svelte": "^3.0.0",
"@unocss/postcss": "link:..\\..\\packages\\postcss",
"svelte": "^3.55.1",
"svelte-check": "^3.0.4",
"tslib": "^2.5.0",
"typescript": "^4.9.5",
"unocss": "link:../../packages/unocss",
"vite": "^4.1.4"
}
}
Empty file.
5 changes: 5 additions & 0 deletions examples/vite-svelte-postcss/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
plugins: {
'@unocss/postcss': {},
},
}
11 changes: 11 additions & 0 deletions examples/vite-svelte-postcss/public/uno.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions examples/vite-svelte-postcss/src/App.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<div text-center font-sans p4 flex flex-col items-center gap-8>
<div class="flex gap-4">
<div class="i-logos-svelte-icon text-3xl" />
<div class="i-logos-unocss text-3xl" />
<div class="i-logos-postcss text-3xl" />
</div>
<div text-gray2 text-2xl font-medium>
UnoCSS + Svelte + PostCSS
</div>
<div class="bg-[url(../src/uno.svg)] bg-[url(/uno.svg)]" h-220px w-220px />
<div class="flex gap-2 items-center">
<button>
Hello
</button>
<div class="dark">
<a href="#">Hello</a>
</div>
</div>
<div class="my-class">
Directives in Svelte SFC
</div>
</div>

<style lang="postcss">
@screen md {
.my-class {
@apply bg-red-800;
color: theme('colors.red.300');
}
}
</style>
8 changes: 8 additions & 0 deletions examples/vite-svelte-postcss/src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import App from './App.svelte'
import './style.css'

const app = new App({
target: document.getElementById('app'),
})

export default app
Loading

0 comments on commit fb53d79

Please sign in to comment.