@symbo.ls/cli 2.11.21 → 2.11.23
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/bin/convert.js +28 -29
- package/package.json +2 -2
package/bin/convert.js
CHANGED
|
@@ -72,35 +72,34 @@ function convertDomqlModule (domqlModule, desiredFormat, options) {
|
|
|
72
72
|
continue
|
|
73
73
|
}
|
|
74
74
|
console.log(key)
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
// }
|
|
75
|
+
try {
|
|
76
|
+
// import('domql-to-mitosis').then(({ convert }) => {
|
|
77
|
+
if (convert) {
|
|
78
|
+
console.group()
|
|
79
|
+
const component = domqlModule[key]
|
|
80
|
+
component.__name = key
|
|
81
|
+
|
|
82
|
+
const out = convert(component, desiredFormat, {
|
|
83
|
+
verbose: false,
|
|
84
|
+
exportDefault: exportCount === 1,
|
|
85
|
+
returnMitosisIR: true,
|
|
86
|
+
importsToRemove: uniqueImports,
|
|
87
|
+
removeReactImport: !first,
|
|
88
|
+
removeUseContextImport
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
convertedStr = convertedStr + out.str + '\n'
|
|
92
|
+
uniqueImports.push(...out.mitosisIR.imports)
|
|
93
|
+
first = false
|
|
94
|
+
if (out.mitosisIR._useContext) { removeUseContextImport = true }
|
|
95
|
+
console.groupEnd()
|
|
96
|
+
} else {
|
|
97
|
+
throw new Error('Convert from `domql-to-mitosis` is not defined. Try to install `domql-to-mitosis` and run this command again.')
|
|
98
|
+
}
|
|
99
|
+
// })
|
|
100
|
+
} catch (err) {
|
|
101
|
+
throw new Error('`domql-to-mitosis` is not found.')
|
|
102
|
+
}
|
|
104
103
|
}
|
|
105
104
|
console.groupEnd()
|
|
106
105
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/cli",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.23",
|
|
4
4
|
"description": "Fetch your Symbols configuration",
|
|
5
5
|
"main": "bin/fetch.js",
|
|
6
6
|
"author": "Symbols",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"domql-to-mitosis": "latest"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "9d882b686390910621a0cb1d0d1cbd6fdf876fc8"
|
|
31
31
|
}
|