zare
v3.4.0
Published
A file base component template engine
Readme
Zare⚡
A file-based component-based template engine for making your frontend more modular.
Table of Contents
Installation
Install Using NPM
npm install zareUsage
To start using the project, follow these steps:
Install packages
npm i express zareExpress Setup with Zare
'/app.js'; import express from 'express'; const app = express(); const port = 3000; app.set('view engine', 'zare'); app.get('/', (req, res) => { res.render('index', { text: 'World' }); }); app.listen(port, () => console.log('Running at http://localhost:3000'));Create a index.zare file in views folder and paste
// views/index.zare serve ( <h1>Hello, @(text)</h1> )Run express app
node app.jsOpen any browser and navigate to
http://localhost:3000/
Example
serve (
<p>Welcome To Zare</p>
)Contributing
- Fork the repo.
- Create a new branch (
git checkout -b feature-name). - Make changes and commit them (
git commit -am 'Add new feature'). - Push the branch to your fork (
git push origin feature-name). - Open a pull request to the
mainbranch with a detailed description of your changes. - If you found an issue, please open a GitHub issue before creating a PR.
License
This project is licensed under the MIT License - see the LICENSE file for details.
