1.0.0-0 • Published 4 years ago

eta_plugin_mixins v1.0.0-0

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

eta_plugin_mixins

GitHub package.json version (master) deno module Travis All Contributors Coveralls

Adds mixin support to the Eta template engine

🌟 Examples

A simple example

<% /* Define the mixin */ %>

<% let body = {@ %>
This is the template body
<% @} %>

<% /* Use the mixin */ %>
<%~ body() %>

Passing data to a mixin

<% let greeting = {@ %>
Hi <%= it.name %>
<% @} %>

<%= greeting({name: "Your Name"}) %>

📜 Usage

import mixins from 'eta_plugin_mixins'
// Or, with Deno
import mixins from 'https://deno.land/x/eta_plugin_mixins/mod.ts'

eta.configure({
  plugins: [mixins()]
})

✔️ Tests

Tests can be run with npm test. Multiple tests check that parsing, rendering, and compiling return expected results, formatting follows guidelines, and code coverage is at the expected level.

Resources

To be added

Projects using eta_plugin_mixins

Contributors

Made with ❤ by @nebrelbug and all these wonderful contributors (emoji key):

This project follows the all-contributors specification. Contributions of any kind are welcome!

Credits