Skip to content

Commit

Permalink
improve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian committed May 8, 2022
1 parent 4e0f690 commit f55aa31
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions README.md
@@ -1,10 +1,9 @@
# ejs-mate

## Status
- [![NPM version](https://badge.fury.io/js/ejs-mate.png)](http://badge.fury.io/js/ejs-mate)
- [![Build Status](https://travis-ci.org/JacksonTian/ejs-mate.png?branch=master)](https://travis-ci.org/JacksonTian/ejs-mate)
- [![Dependencies Status](https://david-dm.org/JacksonTian/ejs-mate.png)](https://david-dm.org/JacksonTian/ejs-mate)
- [![Coverage Status](https://coveralls.io/repos/JacksonTian/ejs-mate/badge.png)](https://coveralls.io/r/JacksonTian/ejs-mate)
[![NPM version](https://badge.fury.io/js/ejs-mate.png)](http://badge.fury.io/js/ejs-mate)
[![Node.js CI](https://github.com/JacksonTian/ejs-mate/actions/workflows/node.js.yml/badge.svg)](https://github.com/JacksonTian/ejs-mate/actions/workflows/node.js.yml)
[![codecov](https://codecov.io/gh/JacksonTian/ejs-mate/branch/master/graph/badge.svg?token=xQKwDgJpbe)](https://codecov.io/gh/JacksonTian/ejs-mate)

## About

Expand Down Expand Up @@ -146,14 +145,12 @@ $ npm test

## Whither Include?

Previous versions of this library had an `include` function. This is now supported directly by EJS, albeit with a different syntax. For `ejs-locals` 1.0+ simply do:
We upgrade EJS to v3.x, it used as a method now:

```html
<% include path/view %>
<%- include('path/view') %>
```

When called anywhere inside a template, this adds the given view to that template using the current options and locals. This is built-in to [EJS](https://github.com/visionmedia/ejs) 1.0+.

## Credits

This library is a fork from Robert Tom Carden's [ejs-locals](https://github.com/RandomEtc/ejs-locals), and the partial function remains relatively untouched from there (aside from cache support). Robert is still updating his library and it now supports other template engines - check it out!
Expand Down

0 comments on commit f55aa31

Please sign in to comment.