@midwayjs/view-ejs 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-ejs
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-ejs
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-ejs
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-ejs
@@ -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": "3.0.0-beta.2",
3
+ "version": "3.0.0-beta.6",
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,7 +22,8 @@
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
29
  "node": ">=12"
@@ -30,14 +31,14 @@
30
31
  "license": "MIT",
31
32
  "dependencies": {
32
33
  "@midwayjs/mw-util": "^1.0.0",
33
- "@midwayjs/view": "^3.0.0-beta.2",
34
+ "@midwayjs/view": "^3.0.0-beta.6",
34
35
  "egg-view-ejs": "^2.0.1"
35
36
  },
36
37
  "devDependencies": {
37
- "@midwayjs/core": "^3.0.0-beta.2",
38
- "@midwayjs/decorator": "^3.0.0-beta.2",
39
- "@midwayjs/koa": "^3.0.0-beta.2",
40
- "@midwayjs/mock": "^3.0.0-beta.2"
38
+ "@midwayjs/core": "^3.0.0-beta.6",
39
+ "@midwayjs/decorator": "^3.0.0-beta.6",
40
+ "@midwayjs/koa": "^3.0.0-beta.6",
41
+ "@midwayjs/mock": "^3.0.0-beta.6"
41
42
  },
42
- "gitHead": "7f07de960da1155a9f7df554e1789c7a97bdd3fe"
43
+ "gitHead": "e4595d30b369e36bef21b36f2b3737d8bc2f802d"
43
44
  }