egg-view-ejs
Advanced tools
+7
-0
| 2.0.0 / 2017-11-15 | ||
| ================== | ||
| **others** | ||
| * [[`05e708e`](http://github.com/eggjs/egg-view-ejs/commit/05e708e4f02897e3dc61d4fc2b8fe675f99f3331)] - refactor: use async function and support egg@2 (#8) (Yiyu He <<dead_horse@qq.com>>) | ||
| * [[`e8e497d`](http://github.com/eggjs/egg-view-ejs/commit/e8e497d83f63384390053ee9baf06c96c3f8eec1)] - docs: Update README.md (#7) (Runrioter Wung <<runrioter@gmail.com>>) | ||
| 1.1.0 / 2017-03-27 | ||
@@ -3,0 +10,0 @@ ================== |
+4
-4
@@ -26,5 +26,5 @@ 'use strict'; | ||
| * render(filename, locals, viewOptions) { | ||
| async render(filename, locals, viewOptions) { | ||
| const config = Object.assign({}, this.config, viewOptions, { filename }); | ||
| const html = yield this[RENDER](filename, locals, config); | ||
| const html = await this[RENDER](filename, locals, config); | ||
| if (!config.layout) { | ||
@@ -35,4 +35,4 @@ return html; | ||
| locals.body = html; | ||
| const layout = yield this.app.view.resolve(config.layout); | ||
| return yield this[RENDER](layout, locals, config); | ||
| const layout = await this.app.view.resolve(config.layout); | ||
| return this[RENDER](layout, locals, config); | ||
| } | ||
@@ -39,0 +39,0 @@ |
+13
-14
| { | ||
| "name": "egg-view-ejs", | ||
| "version": "1.1.0", | ||
| "version": "2.0.0", | ||
| "description": "egg view plugin for ejs", | ||
@@ -19,19 +19,18 @@ "eggPlugin": { | ||
| "dependencies": { | ||
| "ejs": "^2.5.5" | ||
| "ejs": "^2.5.7" | ||
| }, | ||
| "devDependencies": { | ||
| "autod": "^2.7.1", | ||
| "egg": "^0.12.0", | ||
| "egg-bin": "^2.2.0", | ||
| "egg-ci": "^1.1.0", | ||
| "egg-mock": "^3.0.0", | ||
| "egg-view": "^1.0.0", | ||
| "eslint": "^3.15.0", | ||
| "eslint-config-egg": "^3.2.0", | ||
| "mz": "^2.6.0", | ||
| "autod": "^3.0.1", | ||
| "egg": "next", | ||
| "egg-bin": "^4.3.5", | ||
| "egg-ci": "^1.8.0", | ||
| "egg-mock": "^3.13.1", | ||
| "eslint": "^4.11.0", | ||
| "eslint-config-egg": "^5.1.1", | ||
| "mz": "^2.7.0", | ||
| "supertest": "^3.0.0", | ||
| "webstorm-disable-index": "^1.1.2" | ||
| "webstorm-disable-index": "^1.2.0" | ||
| }, | ||
| "engines": { | ||
| "node": ">=6.0.0" | ||
| "node": ">=8.0.0" | ||
| }, | ||
@@ -53,3 +52,3 @@ "scripts": { | ||
| "ci": { | ||
| "version": "6, 7" | ||
| "version": "8, 9" | ||
| }, | ||
@@ -56,0 +55,0 @@ "repository": { |
+4
-4
@@ -62,4 +62,4 @@ # egg-view-ejs | ||
| // app/controller/render.js | ||
| exports.ejs = function* () { | ||
| yield ctx.render('hello.ejs', { | ||
| exports.ejs = async ctx => { | ||
| await ctx.render('hello.ejs', { | ||
| data: 'world', | ||
@@ -100,3 +100,3 @@ }); | ||
| // app/controller/render.js | ||
| exports.ejs = function* () { | ||
| exports.ejs = async ctx => { | ||
| const locals = { | ||
@@ -110,3 +110,3 @@ data: 'world', | ||
| yield ctx.render('hello.ejs', locals, viewOptions); | ||
| await ctx.render('hello.ejs', locals, viewOptions); | ||
| }; | ||
@@ -113,0 +113,0 @@ ``` |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
7959
5.1%10
-9.09%1
Infinity%Updated