Skip to content

Commit 4b43b0e

Browse files
committed
feat: add debug mode to transformation process
- Removed patched dependencies from pnpm-workspace.yaml. - Enhanced CLI to support debug mode with detailed logging. - Updated transformation functions to accept a debug option and log relevant information during processing. - Added debug logging for CSS transformation, inline styles, and Vue component transformation. - Implemented tests to verify debug logging functionality for both standard and inline styles.
1 parent 36c286a commit 4b43b0e

13 files changed

+1214
-725
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ This library is to convert *css*、*inline-style* to UnoCSS. <a href="https://gi
2828
```ts
2929
// vite.config.ts
3030
import { viteTransformToUnocss } from 'transform-to-unocss'
31+
3132
export default defineConfig({
3233
plugins: [viteTransformToUnocss(/* options */)],
3334
})
@@ -42,6 +43,7 @@ export default defineConfig({
4243
// rollup.config.js
4344
import { resolve } from 'node:path'
4445
import { rollupTransformToUnocss } from 'transform-to-unocss'
46+
4547
export default {
4648
plugins: [rollupTransformToUnocss(/* options */)],
4749
}

README_zh.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
```ts
3030
// vite.config.ts
3131
import { viteTransformToUnocss } from 'transform-to-unocss'
32+
3233
export default defineConfig({
3334
plugins: [viteTransformToUnocss(/* options */)],
3435
})
@@ -43,6 +44,7 @@ export default defineConfig({
4344
// rollup.config.js
4445
import { resolve } from 'node:path'
4546
import { rollupTransformToUnocss } from 'transform-to-unocss'
47+
4648
export default {
4749
plugins: [rollupTransformToUnocss(/* options */)],
4850
}

debug-test.vue

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<template>
2+
<div class="container">
3+
<h1 class="title">Debug Test</h1>
4+
<p class="text">This is a test for debug mode</p>
5+
</div>
6+
</template>
7+
8+
<style scoped>
9+
.container {
10+
width: 100%;
11+
max-width: 1200px;
12+
margin: 0 auto;
13+
padding: 20px;
14+
}
15+
16+
.title {
17+
font-size: 24px;
18+
font-weight: bold;
19+
color: #333;
20+
margin-bottom: 16px;
21+
}
22+
23+
.text {
24+
font-size: 16px;
25+
line-height: 1.5;
26+
color: #666;
27+
}
28+
</style>

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
"preview": "pnpm run -C playground preview",
5353
"prepublishOnly": "nr build",
5454
"release": "bumpp && npm publish",
55-
"start": "esno src/index.ts",
5655
"test": "vitest",
5756
"typecheck": "tsc --noEmit"
5857
},
@@ -71,7 +70,7 @@
7170
"picocolors": "^1.1.1",
7271
"sass": "^1.89.2",
7372
"stylus": "^0.63.0",
74-
"transform-to-unocss-core": "^0.0.66",
73+
"transform-to-unocss-core": "^0.0.68",
7574
"unplugin": "^2.3.5"
7675
},
7776
"devDependencies": {
@@ -83,7 +82,6 @@
8382
"@types/stylus": "^0.48.43",
8483
"bumpp": "^8.2.1",
8584
"eslint": "^8.57.1",
86-
"esno": "^0.16.3",
8785
"find-up": "^6.3.0",
8886
"lint-staged": "^13.3.0",
8987
"magic-string": "^0.30.17",

0 commit comments

Comments
 (0)