https://github.com/onedionys/onedionys-template-engine
A library for easily creating and manipulating HTML templates.
https://github.com/onedionys/onedionys-template-engine
onedionys package-manager tea template-engine
Last synced: 5 months ago
JSON representation
A library for easily creating and manipulating HTML templates.
- Host: GitHub
- URL: https://github.com/onedionys/onedionys-template-engine
- Owner: onedionys
- License: mit
- Created: 2024-03-07T03:06:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-07T01:19:53.000Z (about 2 years ago)
- Last Synced: 2025-10-31T13:06:42.401Z (8 months ago)
- Topics: onedionys, package-manager, tea, template-engine
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/onedionys-template-engine
- Size: 145 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Welcome to One Dionys - Template Engine! 👋
A library for easily creating and manipulating HTML templates. 💖
## 💾 Requirements
* `Web Browser` - Can be used as an emulator to build applications. Example [Chrome, Firefox, Safari & Opera].
* `Internet` - Because many use CDN and to make it easier to find solutions to all problems.
## 🎯 How To Use
#### Example Syntax
```javascript
const TemplateEngine = require('./src/templateEngine');
// Define your template
const template = 'Hello {{ name }}!';
// Create an instance of TemplateEngine with your template
const engine = new TemplateEngine(template);
// Define your data
const data = { name: 'World' };
// Render the template with the data
const result = engine.render(data);
console.log(result); // Output: Hello World!
```
#### Explanation
* The TemplateEngine class provides a way to render templates with dynamic data. It uses double curly braces ({{ }}) as placeholders for variables in the template. When you call the render() method with a data object, it replaces the placeholders with corresponding values from the data object.
#### Return Value
* The render() method returns the rendered template as a string.
## 📆 Release Date
* v1.0.0 : 07 March 2024
* v1.0.1 : 11 March 2024
* v4.0.0 : 11 March 2024
* v4.0.1 : 13 March 2024
* v4.0.2 : 18 March 2024
* v5.0.0 : 31 March 2024
## 🧑 Author
* Facebook : Oned Ionys
* Instagram : @onedionys
* Twitter : @onedionys
* LinkedIn : @onedionys
## 📝 License
* Copyright © 2024 One Dionys
* **One Dionys - Template Engine is an open source project licensed under the MIT license**
## ☕️ Suppport & Donation
Love One Dionys - Template Engine? Support this project by donating or sharing with others in need.
**Made with ❤️ One Dionys**