@rsmax/postcss-tag 1.3.3 → 1.3.5
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/CHANGELOG.md +10 -0
- package/index.js +21 -11
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.3.5](https://github.com/remaxjs/remax/compare/v1.3.4...v1.3.5) (2025-06-02)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @rsmax/postcss-tag
|
|
9
|
+
|
|
10
|
+
## [1.3.4](https://github.com/remaxjs/remax/compare/v1.3.3...v1.3.4) (2025-06-02)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- **web:** 修复 web 平台无法启动 ([567d4b8](https://github.com/remaxjs/remax/commit/567d4b88d99f3c2770336619d62197db16199e49))
|
|
15
|
+
|
|
6
16
|
## [1.3.3](https://github.com/remaxjs/remax/compare/v1.3.2...v1.3.3) (2025-05-30)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @rsmax/postcss-tag
|
package/index.js
CHANGED
|
@@ -1,20 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @type {import('postcss').PluginCreator}
|
|
3
|
+
*/
|
|
4
|
+
module.exports = (opts = {}) => {
|
|
5
|
+
// Plugin creator
|
|
3
6
|
return {
|
|
4
|
-
postcssPlugin: 'postcss-rsmax-tag
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
postcssPlugin: 'postcss-rsmax-tag',
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Process all rules in the CSS file
|
|
11
|
+
*/
|
|
12
|
+
Rule(rule) {
|
|
13
|
+
// Check if the rule selector is 'page'
|
|
7
14
|
if (rule.selector === 'page') {
|
|
8
|
-
|
|
15
|
+
// Transform 'page' selector to '.remax-page'
|
|
16
|
+
rule.selector = '.rsmax-page';
|
|
17
|
+
|
|
18
|
+
// Show warning only once per file
|
|
19
|
+
if (!rule.warn) {
|
|
9
20
|
console.warn(
|
|
10
|
-
'如果要兼容 web 应用,请不要在样式中使用 page 选择器,具体请参考 https://remaxjs.org/guide/one/web#样式'
|
|
21
|
+
'如果要兼容 web 应用,请不要在样式中使用 page 选择器,具体请参考 https://remaxjs.org/guide/one/web#样式'
|
|
11
22
|
);
|
|
12
|
-
|
|
13
|
-
warned = true;
|
|
23
|
+
rule.warn = true;
|
|
14
24
|
}
|
|
15
|
-
rule.selector = '.remax-page';
|
|
16
25
|
}
|
|
17
|
-
}
|
|
26
|
+
}
|
|
18
27
|
};
|
|
19
28
|
};
|
|
29
|
+
|
|
20
30
|
module.exports.postcss = true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsmax/postcss-tag",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": "git@github.com:remaxjs/remax.git",
|
|
6
6
|
"author": "Caihuanyu <eterlf41@gmail.com>",
|
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
14
|
-
"gitHead": "
|
|
14
|
+
"gitHead": "c0780753228df9ede0716a8c58055fd9196883e8"
|
|
15
15
|
}
|