@midwayjs/view-ejs 2.14.2 → 3.0.0-beta.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 CHANGED
@@ -3,7 +3,7 @@
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
- ## [2.14.2](https://github.com/midwayjs/midway/compare/v2.14.1...v2.14.2) (2021-12-28)
6
+ # [3.0.0-beta.12](https://github.com/midwayjs/midway/compare/v3.0.0-beta.11...v3.0.0-beta.12) (2021-12-28)
7
7
 
8
8
  **Note:** Version bump only for package @midwayjs/view-ejs
9
9
 
@@ -11,18 +11,85 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
 
13
13
 
14
- # [2.14.0](https://github.com/midwayjs/midway/compare/v2.13.5...v2.14.0) (2021-12-06)
14
+ # [3.0.0-beta.11](https://github.com/midwayjs/midway/compare/v3.0.0-beta.10...v3.0.0-beta.11) (2021-12-21)
15
+
16
+ **Note:** Version bump only for package @midwayjs/view-ejs
17
+
18
+
19
+
20
+
21
+
22
+ # [3.0.0-beta.10](https://github.com/midwayjs/midway/compare/v3.0.0-beta.9...v3.0.0-beta.10) (2021-12-20)
23
+
24
+ **Note:** Version bump only for package @midwayjs/view-ejs
25
+
26
+
27
+
28
+
29
+
30
+ # [3.0.0-beta.9](https://github.com/midwayjs/midway/compare/v3.0.0-beta.8...v3.0.0-beta.9) (2021-12-09)
31
+
32
+ **Note:** Version bump only for package @midwayjs/view-ejs
33
+
34
+
35
+
36
+
37
+
38
+ # [3.0.0-beta.8](https://github.com/midwayjs/midway/compare/v3.0.0-beta.7...v3.0.0-beta.8) (2021-12-08)
15
39
 
16
40
 
17
41
  ### Bug Fixes
18
42
 
19
- * express routing middleware takes effect at the controller level ([#1364](https://github.com/midwayjs/midway/issues/1364)) ([5d5f299](https://github.com/midwayjs/midway/commit/5d5f2992be116ca71b21f01fd782e3a2ac072496))
43
+ * express routing middleware takes effect at the controller level ([#1364](https://github.com/midwayjs/midway/issues/1364)) ([b9272e0](https://github.com/midwayjs/midway/commit/b9272e0971003443304b0c53815be31a0061b4bd))
44
+
45
+
46
+
47
+
48
+
49
+ # [3.0.0-beta.7](https://github.com/midwayjs/midway/compare/v3.0.0-beta.6...v3.0.0-beta.7) (2021-12-03)
50
+
51
+ **Note:** Version bump only for package @midwayjs/view-ejs
52
+
53
+
54
+
55
+
56
+
57
+ # [3.0.0-beta.6](https://github.com/midwayjs/midway/compare/v3.0.0-beta.5...v3.0.0-beta.6) (2021-11-26)
58
+
59
+ **Note:** Version bump only for package @midwayjs/view-ejs
60
+
61
+
62
+
63
+
64
+
65
+ # [3.0.0-beta.5](https://github.com/midwayjs/midway/compare/v3.0.0-beta.4...v3.0.0-beta.5) (2021-11-25)
66
+
67
+ **Note:** Version bump only for package @midwayjs/view-ejs
68
+
69
+
70
+
71
+
72
+
73
+ # [3.0.0-beta.4](https://github.com/midwayjs/midway/compare/v3.0.0-beta.3...v3.0.0-beta.4) (2021-11-24)
74
+
75
+ **Note:** Version bump only for package @midwayjs/view-ejs
76
+
77
+
78
+
79
+
80
+
81
+ # [3.0.0-beta.3](https://github.com/midwayjs/midway/compare/v3.0.0-beta.2...v3.0.0-beta.3) (2021-11-18)
82
+
83
+
84
+ ### Features
85
+
86
+ * add component and framework config definition ([#1367](https://github.com/midwayjs/midway/issues/1367)) ([b2fe615](https://github.com/midwayjs/midway/commit/b2fe6157f99659471ff1333eca0b86bb889f61a3))
20
87
 
21
88
 
22
89
 
23
90
 
24
91
 
25
- ## [2.13.4](https://github.com/midwayjs/midway/compare/v2.13.3...v2.13.4) (2021-10-21)
92
+ # [3.0.0-beta.2](https://github.com/midwayjs/midway/compare/v3.0.0-beta.1...v3.0.0-beta.2) (2021-11-16)
26
93
 
27
94
  **Note:** Version bump only for package @midwayjs/view-ejs
28
95
 
@@ -30,12 +97,12 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
30
97
 
31
98
 
32
99
 
33
- ## [2.13.3](https://github.com/midwayjs/midway/compare/v2.13.2...v2.13.3) (2021-09-28)
100
+ # [3.0.0-beta.1](https://github.com/midwayjs/midway/compare/v2.12.4...v3.0.0-beta.1) (2021-11-14)
34
101
 
35
102
 
36
103
  ### Features
37
104
 
38
- * add view, view-ejs and view-nunjucks ([#1308](https://github.com/midwayjs/midway/issues/1308)) ([2621ae1](https://github.com/midwayjs/midway/commit/2621ae1a82c5c4a4c4347b9bbb4349c8a75bee00))
105
+ * add view, view-ejs and view-nunjucks ([#1308](https://github.com/midwayjs/midway/issues/1308)) ([a00f44b](https://github.com/midwayjs/midway/commit/a00f44bd769052245cd49d49ab417d621bb89caa))
39
106
 
40
107
 
41
108
 
@@ -1,3 +1,3 @@
1
1
  declare const _default: any;
2
- export = _default;
2
+ export default _default;
3
3
  //# sourceMappingURL=config.default.d.ts.map
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
- module.exports = require('egg-view-ejs/config/config.default');
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = require('egg-view-ejs/config/config.default');
3
4
  //# sourceMappingURL=config.default.js.map
@@ -1,3 +1,3 @@
1
1
  declare const _default: any;
2
- export = _default;
2
+ export default _default;
3
3
  //# sourceMappingURL=config.local.d.ts.map
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
- module.exports = require('egg-view-ejs/config/config.local');
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = require('egg-view-ejs/config/config.local');
3
4
  //# sourceMappingURL=config.local.js.map
@@ -13,7 +13,8 @@ exports.ViewEJSConfiguration = void 0;
13
13
  const decorator_1 = require("@midwayjs/decorator");
14
14
  const mw_util_1 = require("@midwayjs/mw-util");
15
15
  const View = require("@midwayjs/view");
16
- const path_1 = require("path");
16
+ const DefaultConfig = require("./config/config.default");
17
+ const LocalConfig = require("./config/config.local");
17
18
  let ViewEJSConfiguration = class ViewEJSConfiguration {
18
19
  async onReady() {
19
20
  const mockApp = (0, mw_util_1.createMockApp)(this.app);
@@ -32,7 +33,12 @@ __decorate([
32
33
  ViewEJSConfiguration = __decorate([
33
34
  (0, decorator_1.Configuration)({
34
35
  namespace: 'view-ejs',
35
- importConfigs: [(0, path_1.join)(__dirname, 'config')],
36
+ importConfigs: [
37
+ {
38
+ default: DefaultConfig,
39
+ local: LocalConfig,
40
+ },
41
+ ],
36
42
  imports: [View],
37
43
  })
38
44
  ], ViewEJSConfiguration);
package/index.d.ts ADDED
@@ -0,0 +1,32 @@
1
+ export * from './dist/index';
2
+
3
+ declare module '@midwayjs/core/dist/interface' {
4
+ interface MidwayConfig {
5
+ ejs?: {
6
+ /**
7
+ * the root directory of ejs files
8
+ */
9
+ root?: string;
10
+ /**
11
+ * compiled functions are cached, only work using `ctx.render`
12
+ */
13
+ cache?: boolean;
14
+ /**
15
+ * output generated function body
16
+ */
17
+ debug?: boolean;
18
+ /**
19
+ * when false no debug instrumentation is compiled
20
+ */
21
+ compileDebug?: boolean;
22
+ /**
23
+ * character to use with angle brackets for open/close
24
+ */
25
+ delimiter?: string;
26
+ /**
27
+ * when set to true, generated function is in strict mode
28
+ */
29
+ strict?: boolean;
30
+ };
31
+ }
32
+ }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@midwayjs/view-ejs",
3
- "version": "2.14.2",
3
+ "version": "3.0.0-beta.12",
4
4
  "description": "Midway Component for egg-view-ejs",
5
5
  "main": "dist/index.js",
6
- "typings": "dist/index.d.ts",
6
+ "typings": "index.d.ts",
7
7
  "scripts": {
8
8
  "build": "tsc",
9
9
  "test": "node --require=ts-node/register ../../node_modules/.bin/jest",
@@ -22,22 +22,23 @@
22
22
  "author": "",
23
23
  "files": [
24
24
  "dist/**/*.js",
25
- "dist/**/*.d.ts"
25
+ "dist/**/*.d.ts",
26
+ "index.d.ts"
26
27
  ],
27
28
  "engines": {
28
- "node": ">= 12.13.0"
29
+ "node": ">=12"
29
30
  },
30
31
  "license": "MIT",
31
32
  "dependencies": {
32
33
  "@midwayjs/mw-util": "^1.0.0",
33
- "@midwayjs/view": "^2.14.2",
34
+ "@midwayjs/view": "^3.0.0-beta.12",
34
35
  "egg-view-ejs": "^2.0.1"
35
36
  },
36
37
  "devDependencies": {
37
- "@midwayjs/core": "^2.14.0",
38
- "@midwayjs/decorator": "^2.14.0",
39
- "@midwayjs/koa": "^2.14.2",
40
- "@midwayjs/mock": "^2.14.0"
38
+ "@midwayjs/core": "^3.0.0-beta.12",
39
+ "@midwayjs/decorator": "^3.0.0-beta.12",
40
+ "@midwayjs/koa": "^3.0.0-beta.12",
41
+ "@midwayjs/mock": "^3.0.0-beta.12"
41
42
  },
42
- "gitHead": "68b7fd9182619e8428f353f24a52254abce6e5bf"
43
+ "gitHead": "1c46e53eb934248007eeb7fe3920f5ac24e272c6"
43
44
  }