1.2.3 • Published 3 years ago

locgent v1.2.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

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
  • 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"
1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago