/otan

A NodeJS module that enables you to use JSON files for website building.

Primary LanguageJavaScriptMIT LicenseMIT

Otan

A NodeJS module to enable you to use JSON files for website building.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • NodeJS

Installing

Install the module from npm

npm install otan

Testing

Run the following command from the project dir to get the generated html file

npm run test

After that,

Navigate to the "tests" folder and open the "test_1.html" to confirm the code's working!

Example

const otan = require("otan");

const json = [{
    "title": "Hello world!"
    },
    {
    "type": "body",
    "children": [{
        "type": "a",
        "html": "Hello world!"
    }]
}]

otan(json, (html)=>{
    console.log(html)
})

Versioning

  • Git

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details