@vtj/local 0.10.2 → 0.10.3
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/index.cjs +10 -4
- package/dist/index.mjs +10 -4
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
@@ -40,9 +40,9 @@ var __publicField$3 = (obj, key, value) => {
|
|
40
40
|
return value;
|
41
41
|
};
|
42
42
|
class JsonRepository {
|
43
|
-
constructor(path$1,
|
43
|
+
constructor(path$1, platform = "web") {
|
44
44
|
__publicField$3(this, "path");
|
45
|
-
const dir = ".vtj";
|
45
|
+
const dir = platform === "uniapp" ? "src/.vtj" : ".vtj";
|
46
46
|
this.path = path.resolve(dir, path$1);
|
47
47
|
}
|
48
48
|
exist(name) {
|
@@ -324,14 +324,20 @@ class UniRepository {
|
|
324
324
|
if (page.id === project.homepage) {
|
325
325
|
json.unshift({
|
326
326
|
path: `pages/${page.id}`,
|
327
|
-
style:
|
327
|
+
style: Object.assign(
|
328
|
+
{ navigationBarTitleText: page.title },
|
329
|
+
page.style || {}
|
330
|
+
),
|
328
331
|
needLogin: page.needLogin,
|
329
332
|
vtj: true
|
330
333
|
});
|
331
334
|
} else {
|
332
335
|
json.push({
|
333
336
|
path: `pages/${page.id}`,
|
334
|
-
style:
|
337
|
+
style: Object.assign(
|
338
|
+
{ navigationBarTitleText: page.title },
|
339
|
+
page.style || {}
|
340
|
+
),
|
335
341
|
needLogin: page.needLogin,
|
336
342
|
vtj: true
|
337
343
|
});
|
package/dist/index.mjs
CHANGED
@@ -33,9 +33,9 @@ var __publicField$3 = (obj, key, value) => {
|
|
33
33
|
return value;
|
34
34
|
};
|
35
35
|
class JsonRepository {
|
36
|
-
constructor(path,
|
36
|
+
constructor(path, platform = "web") {
|
37
37
|
__publicField$3(this, "path");
|
38
|
-
const dir = ".vtj";
|
38
|
+
const dir = platform === "uniapp" ? "src/.vtj" : ".vtj";
|
39
39
|
this.path = resolve(dir, path);
|
40
40
|
}
|
41
41
|
exist(name) {
|
@@ -317,14 +317,20 @@ class UniRepository {
|
|
317
317
|
if (page.id === project.homepage) {
|
318
318
|
json.unshift({
|
319
319
|
path: `pages/${page.id}`,
|
320
|
-
style:
|
320
|
+
style: Object.assign(
|
321
|
+
{ navigationBarTitleText: page.title },
|
322
|
+
page.style || {}
|
323
|
+
),
|
321
324
|
needLogin: page.needLogin,
|
322
325
|
vtj: true
|
323
326
|
});
|
324
327
|
} else {
|
325
328
|
json.push({
|
326
329
|
path: `pages/${page.id}`,
|
327
|
-
style:
|
330
|
+
style: Object.assign(
|
331
|
+
{ navigationBarTitleText: page.title },
|
332
|
+
page.style || {}
|
333
|
+
),
|
328
334
|
needLogin: page.needLogin,
|
329
335
|
vtj: true
|
330
336
|
});
|
package/package.json
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vtj/local",
|
3
3
|
"private": false,
|
4
|
-
"version": "0.10.
|
4
|
+
"version": "0.10.3",
|
5
5
|
"type": "module",
|
6
6
|
"dependencies": {
|
7
7
|
"formidable": "~3.5.1",
|
8
|
-
"@vtj/core": "~0.10.
|
9
|
-
"@vtj/
|
10
|
-
"@vtj/coder": "~0.10.
|
11
|
-
"@vtj/
|
8
|
+
"@vtj/core": "~0.10.3",
|
9
|
+
"@vtj/parser": "~0.10.3",
|
10
|
+
"@vtj/coder": "~0.10.3",
|
11
|
+
"@vtj/node": "~0.10.1"
|
12
12
|
},
|
13
13
|
"devDependencies": {
|
14
14
|
"@types/formidable": "~3.4.5",
|