Skip to content

Commit

Permalink
update 09/07/2022 🎉 ..
Browse files Browse the repository at this point in the history
  • Loading branch information
3imed-jaberi committed Jul 9, 2022
1 parent 289bdbd commit 9fcef07
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 15 deletions.
14 changes: 14 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"all": false,
"exclude": [
"**/*.test.js",
"example"
],
"reporter": [
"text-lcov",
"text",
"lcov"
],
"report-dir": "./coverage",
"temp-dir": "./.nyc_output"
}
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The MIT License (MIT)

Copyright (c) 2017 dead_horse
Copyright(c) 2017 dead_horse
Copyright(c) 2021-2022 imed-jaberi <imed-jaberi@outlook.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ app.listen(7001);

Or you can checkout the [example](https://github.com/koajs/ejs/tree/master/example).

### settings
### Settings

- root: view root directory.
- layout: global layout file, default is `layout`, set `false` to disable layout.
Expand Down Expand Up @@ -75,14 +75,11 @@ Supports ejs includes.

Support [`ctx.state` in koa](https://github.com/koajs/koa/blob/master/docs/api/context.md#ctxstate).

## Licences

(The MIT License)

Copyright (c) 2017 dead-horse and other contributors
### TypeScript

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
If you're project based on TypeScript, we recommend using [`@types/koa-ejs`](https://www.npmjs.com/package/@types/koa-ejs) until we start supporting it in the upcoming releases.

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
## Licences

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[(The MIT License)](LICENSE)
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*!
* koa-ejs
*
* Copyright(c) 2017 dead_horse <dead_horse@qq.com>
* Copyright(c) 2021-2022 imed-jaberi <imed-jaberi@outlook.com>
* MIT Licensed
*/

Expand Down Expand Up @@ -74,7 +76,7 @@ function koaEjs (app, settings) {
const viewPath = path.join(settings.root, view)
debug(`render: ${viewPath}`)
// get from cache
if (settings.cache && cache[viewPath]) { return cache[viewPath](options.scope, options) }
if (settings.cache && cache[viewPath]) return cache[viewPath](options.scope, options)

const tpl = await fs.readFile(viewPath, 'utf8')

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
],
"license": "MIT",
"dependencies": {
"debug": "^4.3.2",
"ejs": "^3.1.6"
"debug": "^4.3.4",
"ejs": "^3.1.8"
},
"devDependencies": {
"cross-env": "^7.0.3",
Expand All @@ -51,11 +51,11 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0",
"koa": "^2.13.1",
"mocha": "^9.0.2",
"koa": "^2.13.4",
"mocha": "^10.0.0",
"nyc": "^15.1.0",
"should": "^13.2.3",
"supertest": "^6.1.3"
"supertest": "^6.2.4"
},
"engine": {
"node": ">= 12"
Expand Down

0 comments on commit 9fcef07

Please sign in to comment.