babel-preset-cssxjs 0.2.10 → 0.2.12
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 +12 -0
- package/index.js +19 -5
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# v0.2.11 (Fri Nov 07 2025)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- fix: make pug reconstruct bindings; add extra options to babel preset; implement reactive update of @media for web and RN ([@cray0000](https://github.com/cray0000))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Pavel Zhukov ([@cray0000](https://github.com/cray0000))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
1
13
|
# v0.2.0 (Tue Nov 04 2025)
|
|
2
14
|
|
|
3
15
|
#### 🚀 Enhancement
|
package/index.js
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
// platform - the actual platform (e.g. 'ios', 'android', 'web'). Default: 'web'.
|
|
2
|
+
// On React Native this should be passed.
|
|
3
|
+
// reactType - force the React target platform (e.g. 'react-native', 'web'). Default: undefined.
|
|
4
|
+
// This shouldn't be needed in most cases since it will be automatically detected.
|
|
5
|
+
// cache - force the CSS caching library instance (e.g. 'teamplay'). Default: undefined
|
|
6
|
+
// This shouldn't be needed in most cases since it will be automatically detected.
|
|
7
|
+
module.exports = (api, {
|
|
8
|
+
platform,
|
|
9
|
+
reactType,
|
|
10
|
+
cache,
|
|
11
|
+
transformPug = true,
|
|
12
|
+
transformCss = true
|
|
13
|
+
} = {}) => {
|
|
2
14
|
return {
|
|
3
15
|
overrides: [{
|
|
4
16
|
test: isJsxSource,
|
|
@@ -24,17 +36,19 @@ module.exports = (api, { platform } = {}) => {
|
|
|
24
36
|
plugins: [
|
|
25
37
|
// transform pug to jsx. This generates a bunch of new AST nodes
|
|
26
38
|
// (it's important to do this first before any dead code elimination runs)
|
|
27
|
-
[require('@cssxjs/babel-plugin-react-pug'), {
|
|
39
|
+
transformPug && [require('@cssxjs/babel-plugin-react-pug'), {
|
|
28
40
|
classAttribute: 'styleName'
|
|
29
41
|
}],
|
|
30
42
|
// inline CSS modules (styl`` in the same JSX file -- similar to how it is in Vue.js)
|
|
31
|
-
[require('@cssxjs/babel-plugin-rn-stylename-inline'), {
|
|
43
|
+
transformCss && [require('@cssxjs/babel-plugin-rn-stylename-inline'), {
|
|
32
44
|
platform
|
|
33
45
|
}],
|
|
34
46
|
// CSS modules (separate .styl/.css file)
|
|
35
|
-
[require('@cssxjs/babel-plugin-rn-stylename-to-style'), {
|
|
47
|
+
transformCss && [require('@cssxjs/babel-plugin-rn-stylename-to-style'), {
|
|
36
48
|
extensions: ['styl', 'css'],
|
|
37
|
-
useImport: true
|
|
49
|
+
useImport: true,
|
|
50
|
+
reactType,
|
|
51
|
+
cache
|
|
38
52
|
}]
|
|
39
53
|
].filter(Boolean)
|
|
40
54
|
}]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babel-preset-cssxjs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"description": "Babel preset for compiling CSSX",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/plugin-syntax-jsx": "^7.0.0",
|
|
18
18
|
"@babel/plugin-syntax-typescript": "^7.23.3",
|
|
19
|
-
"@cssxjs/babel-plugin-react-pug": "^0.2.
|
|
20
|
-
"@cssxjs/babel-plugin-rn-stylename-inline": "^0.2.
|
|
21
|
-
"@cssxjs/babel-plugin-rn-stylename-to-style": "^0.2.
|
|
19
|
+
"@cssxjs/babel-plugin-react-pug": "^0.2.12",
|
|
20
|
+
"@cssxjs/babel-plugin-rn-stylename-inline": "^0.2.12",
|
|
21
|
+
"@cssxjs/babel-plugin-rn-stylename-to-style": "^0.2.12"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "353563eb72be74e2911d1343adcda32eceba43e5"
|
|
24
24
|
}
|