JSPM

eta_plugin_mixins

1.0.0-1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q12333F
  • License MIT

Add mixins support to the Eta template engine

Package Exports

  • eta_plugin_mixins

Readme

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):


Ben Gubler

💻 💬 📖 ⚠️

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

Credits