@midwayjs/view 3.0.0-beta.2 → 3.0.0-beta.6
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
CHANGED
|
@@ -3,6 +3,41 @@
|
|
|
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
|
+
# [3.0.0-beta.6](https://github.com/midwayjs/midway/compare/v3.0.0-beta.5...v3.0.0-beta.6) (2021-11-26)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @midwayjs/view
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.0.0-beta.5](https://github.com/midwayjs/midway/compare/v3.0.0-beta.4...v3.0.0-beta.5) (2021-11-25)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @midwayjs/view
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [3.0.0-beta.4](https://github.com/midwayjs/midway/compare/v3.0.0-beta.3...v3.0.0-beta.4) (2021-11-24)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @midwayjs/view
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# [3.0.0-beta.3](https://github.com/midwayjs/midway/compare/v3.0.0-beta.2...v3.0.0-beta.3) (2021-11-18)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* add component and framework config definition ([#1367](https://github.com/midwayjs/midway/issues/1367)) ([b2fe615](https://github.com/midwayjs/midway/commit/b2fe6157f99659471ff1333eca0b86bb889f61a3))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
6
41
|
# [3.0.0-beta.2](https://github.com/midwayjs/midway/compare/v3.0.0-beta.1...v3.0.0-beta.2) (2021-11-16)
|
|
7
42
|
|
|
8
43
|
**Note:** Version bump only for package @midwayjs/view
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
3
|
const path_1 = require("path");
|
|
3
4
|
const extend = require("extend2");
|
|
4
|
-
|
|
5
|
+
exports.default = appInfo => {
|
|
5
6
|
const originConfig = require('egg-view/config/config.default')(appInfo);
|
|
6
7
|
return extend(true, originConfig, {
|
|
7
8
|
view: {
|
package/dist/configuration.js
CHANGED
|
@@ -12,7 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ViewConfiguration = void 0;
|
|
13
13
|
const decorator_1 = require("@midwayjs/decorator");
|
|
14
14
|
const mw_util_1 = require("@midwayjs/mw-util");
|
|
15
|
-
const
|
|
15
|
+
const DefaultConfig = require("./config/config.default");
|
|
16
|
+
const LocalConfig = require("./config/config.local");
|
|
16
17
|
const viewManager_1 = require("./viewManager");
|
|
17
18
|
let ViewConfiguration = class ViewConfiguration {
|
|
18
19
|
async onReady(container) {
|
|
@@ -35,7 +36,12 @@ __decorate([
|
|
|
35
36
|
ViewConfiguration = __decorate([
|
|
36
37
|
(0, decorator_1.Configuration)({
|
|
37
38
|
namespace: 'view',
|
|
38
|
-
importConfigs: [
|
|
39
|
+
importConfigs: [
|
|
40
|
+
{
|
|
41
|
+
default: DefaultConfig,
|
|
42
|
+
local: LocalConfig,
|
|
43
|
+
},
|
|
44
|
+
],
|
|
39
45
|
})
|
|
40
46
|
], ViewConfiguration);
|
|
41
47
|
exports.ViewConfiguration = ViewConfiguration;
|
package/index.d.ts
CHANGED
|
@@ -44,4 +44,29 @@ declare module '@midwayjs/core/dist/interface' {
|
|
|
44
44
|
options?: RenderOptions
|
|
45
45
|
): Promise<string>;
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
interface MidwayConfig {
|
|
49
|
+
view?: {
|
|
50
|
+
/**
|
|
51
|
+
* give a path to find the file, you can specify multiple path with `,` delimiter
|
|
52
|
+
*/
|
|
53
|
+
root?: string;
|
|
54
|
+
/**
|
|
55
|
+
* whether cache the file's path
|
|
56
|
+
*/
|
|
57
|
+
cache?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* defaultExtension can be added automatically when there is no extension when call `ctx.render`
|
|
60
|
+
*/
|
|
61
|
+
defaultExtension?: string;
|
|
62
|
+
/**
|
|
63
|
+
* set the default view engine if you don't want specify the viewEngine every request.
|
|
64
|
+
*/
|
|
65
|
+
defaultViewEngine?: string;
|
|
66
|
+
/**
|
|
67
|
+
* map the file extension to view engine, such as `{ '.ejs': 'ejs' }`
|
|
68
|
+
*/
|
|
69
|
+
mapping?: Record<string, string>;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
47
72
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/view",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.6",
|
|
4
4
|
"description": "Midway Component for egg-view",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"extend2": "^1.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@midwayjs/core": "^3.0.0-beta.
|
|
37
|
-
"@midwayjs/decorator": "^3.0.0-beta.
|
|
38
|
-
"@midwayjs/koa": "^3.0.0-beta.
|
|
39
|
-
"@midwayjs/mock": "^3.0.0-beta.
|
|
36
|
+
"@midwayjs/core": "^3.0.0-beta.6",
|
|
37
|
+
"@midwayjs/decorator": "^3.0.0-beta.6",
|
|
38
|
+
"@midwayjs/koa": "^3.0.0-beta.6",
|
|
39
|
+
"@midwayjs/mock": "^3.0.0-beta.6"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "e4595d30b369e36bef21b36f2b3737d8bc2f802d"
|
|
42
42
|
}
|