1.2.3 • Published 3 years ago
locgent v1.2.3
locgent
locgent is a script what generates html templates from localization JSON files. src folder has an example to test script.
Installing
npm install locgent
Instructions
The script is very stupid and it works only if you follow the instructions below:
Project structure
src
- email-name
- localizations
- en.json
- es.json
- etc...
- examples
- src.html
- localizations
- email-name
src.html must contain an HTML code with variables. examples folder must contain a localization folder with localization files.
Variable format
[var_name]
The script doesn't work with nested JSON parameters for now.
src.html content example
<div>
<h1>{header_var}</h1>
<p>{paragraph_var}</p>
</div>
Package.json script
"script_name": "node node_modules/locgent/locgent.js"