3.2.6 ā€¢ Published 2 days ago

@sanktionsfrei/shared-fax-template v3.2.6

Weekly downloads
1
License
UNLICENSED
Repository
github
Last release
2 days ago

shared-fax-template

šŸ“˜ Main fax template to be shared between frontend & backend and to be consumed by handlebars

The idea behind this is that we can share the main template between the cronjobs and the frontend, making it easier for everyone to maintain the text content.

This includes the regular node build and one build for the browser.

Browser

Include ./dist/fax-template.js as script in your HTML page. It exports the precompiled template to Handlebars.templates.fax

<html>
  <body>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.6/handlebars.runtime.min.js"></script>
    <script src="/assets/shared-fax-template/dist/fax-template.js"></script>
    <script>
      console.log(Handlebars.templates.fax({firstName: 'Robin'}))
    </script>
  </body>
</html>

Node

In node it's exported as regular CommonJS module.

package.json

"dependencies": {
  "shared-fax-template": "sanktionsdev/shared-fax-template"
}

Your code

const Handlebars = require('handlebars')
const faxTemplate = require('shared-fax-template')

const template = Handlebars.compile(window.faxTemplate)
console.log(template({firstName: 'Robin'}))
3.2.6

2 days ago

3.2.5

9 months ago

3.2.4

5 years ago

3.2.3

6 years ago

3.2.2

7 years ago

3.2.1

7 years ago

3.2.0

7 years ago

3.1.1

7 years ago

3.1.0

7 years ago

3.0.0

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago