diff --git a/README.md b/README.md index 9a602ed..2cc124c 100644 --- a/README.md +++ b/README.md @@ -1,64 +1,10 @@ -
- - - -## Table of contents - -- [Table of contents](#table-of-contents) -- [Maintainers](#maintainers) - - - # Edge -> A template for Node.js - -[![gh-workflow-image]][gh-workflow-url] [![typescript-image]][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url] [![synk-image]][synk-url] - -Edge is a logical and batteries included template engine for Node.js. It can render any text based format, whether is **HTML**, **Markdown** or **plain text** files. - -## Usage -Install the package from the npm registry. - -```sh -npm i edge.js - -# yarn -yarn add edge.js -``` - -And use it as follows -```js -const { join } = require('path') +[![gh-workflow-image]][gh-workflow-url] [![typescript-image]][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url] -// CommonJS -const { Edge } = require('edge.js') +Edge is a simple, Modern, and batteries included template engine for Node.js. Edge is similar to writing JavaScript. If you know JavaScript, you know Edge. -// Typescript import -// import { Edge } from 'edge.js' - -const edge = new Edge({ cache: false }) -edge.mount(join(__dirname, 'views')) - -const html = await edge.render('welcome', { - greeting: 'Hello world' -}) - -console.log(html) -``` - -Next create the `views/welcome.edge` file. - -```edge -{{ greeting }}
-``` - -Edge was created to be used inside the AdonisJS framework. However it is a framework agnostic library and can be used standalone as well. - -The documentation is written on the [AdonisJS website](https://docs.adonisjs.com/guides/views/rendering). In AdonisJS docs, we refer the `edge` variable as `view`. - -