Skip to content

JSInventions/roostjs

Repository files navigation

Roost.js

A small, flex library that can convert JSON HTML (JHTML, not Java HTML.) to normal HTML.

Try

To test the JSON example app, you need to do these steps:

  • Open the terminal, run git clone https://github.com/JSInventions/roostjs.git
  • Open the source
  • Run nodemon host/test.js
  • Open localhost:3000
  • Run and Play index.json!

What is JHTML?

JSON HTML is a language made in the Roost.js library, you can use it like normal JSON:

{
    "lang": "en",
    "html": {
        "content": {
            "head": {
                "content":{
                    "title": {
                        "content":"My website"
                    },
                    "link-0": {
                        "ref": "stylesheet",
                        "href": "index.css"
                    },
                }
            },
            "body": {
                "content":{
                    "div-1": {
                        "id": "nav",
                        "content": {
                            "h1-2": {
                                "id": "logo",
                                "content": "Welcome!"
                            }
                        }
                    }
                }
            }
        }
    }
}

And then can be parsed using roost.parse(...), and it can be adapted to run on an express server. (run node host/test.js if cloned this project!)

For legacy purposes, i still kept roost.compile(...) which points to roost.parse(...)

Dependecies

  • None because Roost was built from scratch without libraries, it's just JavaScript.

About

NPM library to convert JHTML to HTML!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •