@weapp-tailwindcss/lynx 0.2.1 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -2
- package/README.zh-CN.md +6 -5
- package/dist/index.cjs +16 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +16 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -61,10 +61,15 @@ pnpm --filter @weapp-tailwindcss/lynx test
|
|
|
61
61
|
pnpm e2e:lynx
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
`examples/react-lynx` is a multi-page compatibility lab pinned to Tailwind CSS `4.3.3`, Lynx Engine `4.0.1`, bundle `engineVersion: '3.9'`, and `@lynx-js/css-defines` `0.0.16`. Representative cases cover every official utility family, variant kind, directive, and arbitrary syntax branch.
|
|
65
|
+
|
|
66
|
+
The static gate parses the real `main.css` with PostCSS, then combines `tasm.json.css.cssMap` with encoder removal logs to record `generated` and `bundled` separately. Native support comes only from committed iOS and Android reports; css-defines is only a version hint.
|
|
65
67
|
|
|
66
68
|
```bash
|
|
69
|
+
pnpm e2e:lynx:android
|
|
67
70
|
pnpm e2e:lynx:ios
|
|
71
|
+
pnpm e2e:lynx:native
|
|
72
|
+
pnpm e2e:lynx:update
|
|
68
73
|
```
|
|
69
74
|
|
|
70
|
-
The
|
|
75
|
+
The native hosts are pinned to Pixel 7/API 35 x86_64 and iPhone 16 Pro/iOS 18.5. The updater requires complete reports from both platforms for the same catalog and Engine version. Missing results, regressions, and newly supported behavior all require explicit review.
|
package/README.zh-CN.md
CHANGED
|
@@ -101,14 +101,15 @@ pnpm --filter @weapp-tailwindcss/lynx test
|
|
|
101
101
|
pnpm e2e:lynx
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
仓库中的 `examples/react-lynx` 是多页面兼容性实验室,固定 Tailwind CSS `4.3.3`、Lynx Engine `4.0.1`、bundle `engineVersion: '3.9'` 和 `@lynx-js/css-defines` `0.0.16`。它以代表值覆盖官方 utility 功能族、variant、指令和任意语法分支。
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
仓库开发者可在已安装 LynxExplorer 的 iOS Simulator 中运行:
|
|
106
|
+
静态 gate 使用 PostCSS 解析真实 `main.css`,并结合 `tasm.json.css.cssMap` 与 encoder removal 日志分别记录 `generated` 和 `bundled`。原生结论只来自固定 iOS/Android host 的已提交报告,`css-defines` 只用于版本提示。
|
|
109
107
|
|
|
110
108
|
```bash
|
|
109
|
+
pnpm e2e:lynx:android
|
|
111
110
|
pnpm e2e:lynx:ios
|
|
111
|
+
pnpm e2e:lynx:native
|
|
112
|
+
pnpm e2e:lynx:update
|
|
112
113
|
```
|
|
113
114
|
|
|
114
|
-
|
|
115
|
+
原生 host 分别固定 Pixel 7/API 35 x86_64 与 iPhone 16 Pro/iOS 18.5。更新器要求同一 catalog 与 Engine 版本的完整双端报告同时存在;缺失结果、能力退化或意外新增支持都会失败,不能手工编辑基线。
|
package/dist/index.cjs
CHANGED
|
@@ -27,6 +27,21 @@ function normalizeOptions(options) {
|
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
+
function normalizeRspackOptions(options) {
|
|
31
|
+
const cssImportRewriteLoader = options?.cssImportRewriteLoader;
|
|
32
|
+
if (cssImportRewriteLoader === false) return options ?? {};
|
|
33
|
+
const loaderOptions = cssImportRewriteLoader === true || cssImportRewriteLoader === void 0 ? {} : cssImportRewriteLoader;
|
|
34
|
+
return {
|
|
35
|
+
...options,
|
|
36
|
+
cssImportRewriteLoader: {
|
|
37
|
+
...loaderOptions,
|
|
38
|
+
options: {
|
|
39
|
+
...loaderOptions.options,
|
|
40
|
+
generateCss: true
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
30
45
|
/**
|
|
31
46
|
* 为 ReactLynx + Rspeedy 注册 Tailwind CSS v4 构建链路。
|
|
32
47
|
*
|
|
@@ -42,7 +57,7 @@ function pluginLynxTailwindcss(options = {}) {
|
|
|
42
57
|
chain.plugin(PLUGIN_NAME).use(weapp_tailwindcss_rspack.WeappTailwindcss, [normalizedOptions]);
|
|
43
58
|
return chain;
|
|
44
59
|
});
|
|
45
|
-
rsbuildApi.modifyRspackConfig((config) => (0, weapp_tailwindcss_rspack.patchRspackConfig)(config, options.rspack));
|
|
60
|
+
rsbuildApi.modifyRspackConfig((config) => (0, weapp_tailwindcss_rspack.patchRspackConfig)(config, normalizeRspackOptions(options.rspack)));
|
|
46
61
|
}
|
|
47
62
|
};
|
|
48
63
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PatchRspackConfigOptions } from "weapp-tailwindcss/rspack";
|
|
2
1
|
import { RsbuildPlugin } from "@lynx-js/rspeedy";
|
|
3
2
|
import { WeappTailwindcssGeneratorOptions } from "weapp-tailwindcss/generator";
|
|
3
|
+
import { PatchRspackConfigOptions } from "weapp-tailwindcss/rspack";
|
|
4
4
|
import { UserDefinedOptions } from "weapp-tailwindcss/types";
|
|
5
5
|
//#region src/index.d.ts
|
|
6
6
|
declare const PLUGIN_NAME = "weapp-tailwindcss:lynx";
|
package/dist/index.js
CHANGED
|
@@ -26,6 +26,21 @@ function normalizeOptions(options) {
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
+
function normalizeRspackOptions(options) {
|
|
30
|
+
const cssImportRewriteLoader = options?.cssImportRewriteLoader;
|
|
31
|
+
if (cssImportRewriteLoader === false) return options ?? {};
|
|
32
|
+
const loaderOptions = cssImportRewriteLoader === true || cssImportRewriteLoader === void 0 ? {} : cssImportRewriteLoader;
|
|
33
|
+
return {
|
|
34
|
+
...options,
|
|
35
|
+
cssImportRewriteLoader: {
|
|
36
|
+
...loaderOptions,
|
|
37
|
+
options: {
|
|
38
|
+
...loaderOptions.options,
|
|
39
|
+
generateCss: true
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
29
44
|
/**
|
|
30
45
|
* 为 ReactLynx + Rspeedy 注册 Tailwind CSS v4 构建链路。
|
|
31
46
|
*
|
|
@@ -41,7 +56,7 @@ function pluginLynxTailwindcss(options = {}) {
|
|
|
41
56
|
chain.plugin(PLUGIN_NAME).use(WeappTailwindcss, [normalizedOptions]);
|
|
42
57
|
return chain;
|
|
43
58
|
});
|
|
44
|
-
rsbuildApi.modifyRspackConfig((config) => patchRspackConfig(config, options.rspack));
|
|
59
|
+
rsbuildApi.modifyRspackConfig((config) => patchRspackConfig(config, normalizeRspackOptions(options.rspack)));
|
|
45
60
|
}
|
|
46
61
|
};
|
|
47
62
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-tailwindcss/lynx",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"description": "Tailwind CSS integration for ReactLynx and Rspeedy cross-platform builds. 面向 ReactLynx 与 Rspeedy 跨端构建的 Tailwind CSS 集成。",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"weapp-tailwindcss": "
|
|
46
|
+
"weapp-tailwindcss": "5.3.2"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@lynx-js/rspeedy": "^0.16.3",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "tsdown",
|
|
55
|
-
"test": "vitest run",
|
|
56
|
-
"test:dev": "vitest",
|
|
55
|
+
"test": "node ../../scripts/ensure-weapp-tailwindcss-built.mjs && vitest run",
|
|
56
|
+
"test:dev": "node ../../scripts/ensure-weapp-tailwindcss-built.mjs && vitest",
|
|
57
57
|
"lint": "eslint .",
|
|
58
58
|
"release": "pnpm publish"
|
|
59
59
|
}
|