@cloudbase/lowcode-builder 1.0.23 → 1.0.26
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/dist/builder.web.js +71 -0
- package/lib/builder/mp/index.js +5 -5
- package/lib/builder/mp/util.js +2 -1
- package/lib/builder.web.js +11 -11
- package/package.json +3 -3
- package/template/html/index.html.ejs +2 -2
package/lib/builder/mp/index.js
CHANGED
|
@@ -162,7 +162,7 @@ async function generateWxMp({ weapps, projDir, appId, domain, materials, plugins
|
|
|
162
162
|
styles = styles.concat((lib.styles || []).map((stylePath) => stylePath && !stylePath.startsWith('/') ? `/${config_1.materialsDirName}/${lib.name}/${stylePath}` : stylePath) || []);
|
|
163
163
|
return styles;
|
|
164
164
|
}, [])
|
|
165
|
-
.concat(importor.styles.map((mod) => path_1.default.join('lowcode', (0, weapps_core_1.getCodeModuleFilePath)('global', mod, { style: '.wxss' })))),
|
|
165
|
+
.concat(importor.styles.map((mod) => path_1.default.posix.join('lowcode', (0, weapps_core_1.getCodeModuleFilePath)('global', mod, { style: '.wxss' })))),
|
|
166
166
|
},
|
|
167
167
|
'package.json': {
|
|
168
168
|
appId,
|
|
@@ -322,7 +322,7 @@ async function generatePkg(weapp, appRoot, ctx, pageConfigs) {
|
|
|
322
322
|
},
|
|
323
323
|
debug: ctx.debugMode,
|
|
324
324
|
stringifyObj: util_1.inspect,
|
|
325
|
-
subLevelPath: rootPath ? `${path_1.default.relative(rootPath, '')}/` : '',
|
|
325
|
+
subLevelPath: rootPath ? `${path_1.default.posix.relative(rootPath, '')}/` : '',
|
|
326
326
|
importor,
|
|
327
327
|
},
|
|
328
328
|
[`index.json|${pageFileName}.json`]: {
|
|
@@ -336,9 +336,9 @@ async function generatePkg(weapp, appRoot, ctx, pageConfigs) {
|
|
|
336
336
|
},
|
|
337
337
|
[`index.wxss|${pageFileName}.wxss`]: {
|
|
338
338
|
subWxss: rootPath && !((_b = ctx.mainAppData) === null || _b === void 0 ? void 0 : _b.mpPkgUrl)
|
|
339
|
-
? `@import "${path_1.default.relative(`/${rootPath}/pages/${page.id}`, '/lowcode')}/style.wxss";`
|
|
339
|
+
? `@import "${path_1.default.posix.relative(`/${rootPath}/pages/${page.id}`, '/lowcode')}/style.wxss";`
|
|
340
340
|
: '',
|
|
341
|
-
content: (0, weapps_core_1.toCssText)((0,
|
|
341
|
+
content: (0, weapps_core_1.toCssText)((0, cals_1.processCommonStyle2CSSProperties)(page.commonStyle, {
|
|
342
342
|
toRem: false,
|
|
343
343
|
toRpx: true,
|
|
344
344
|
}), 'page'),
|
|
@@ -391,7 +391,7 @@ async function generateFramework(appData, outDir, ctx) {
|
|
|
391
391
|
'app/weapps-api.js': {
|
|
392
392
|
appId: ctx.appId,
|
|
393
393
|
domain: ctx.domain || '',
|
|
394
|
-
subLevelPath: appData.rootPath ? `${path_1.default.relative(`${appData.rootPath}`, '')}/` : '',
|
|
394
|
+
subLevelPath: appData.rootPath ? `${path_1.default.posix.relative(`${appData.rootPath}`, '')}/` : '',
|
|
395
395
|
subPackageName: appData.rootPath || '',
|
|
396
396
|
importor,
|
|
397
397
|
appConfig: (0, util_3.JsonToStringWithVariableName)({
|
package/lib/builder/mp/util.js
CHANGED
|
@@ -5,11 +5,12 @@ const weapps_core_1 = require("@cloudbase/lowcode-generator/lib/weapps-core");
|
|
|
5
5
|
const weapp_1 = require("@cloudbase/lowcode-generator/lib/generator/util/weapp");
|
|
6
6
|
const wxml_1 = require("./wxml");
|
|
7
7
|
const mp_1 = require("@cloudbase/lowcode-generator/lib/generator/config/mp");
|
|
8
|
+
const cals_1 = require("@cloudbase/cals");
|
|
8
9
|
function extractWidgetProps(props, compInfo) {
|
|
9
10
|
var _a, _b;
|
|
10
11
|
const { classList } = props;
|
|
11
12
|
const staticProps = {
|
|
12
|
-
style: (0,
|
|
13
|
+
style: (0, cals_1.processCommonStyle2CSSProperties)(props.commonStyle, {
|
|
13
14
|
toRpx: true,
|
|
14
15
|
toRem: false,
|
|
15
16
|
}),
|