Skip to content

Matt-Esch/jsonml-document

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsonml-document

build status dependency status

browser support

Produces a valid html5 document from JsonML

Example

var doc = require('jsonml-document')


var docString = doc(["html", [
    ["head", [
        ["meta", { charset: "utf-8" }],
        ["title", "Test document"],
        ["link", { rel: "stylesheet", href: "/css/main" }]
    ]],
    ["body", { class: "main" }, [
        ["p", "This is a test document"],
        ["script", { src: "/js/main" }]
    ]]
]])

/* docString:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8"></meta>
        <title>
            Test document
        </title>
        <link rel="stylesheet" href="/css/main"></link>
    </head>
    <body class="main">
        <p>
            This is a test document
        </p>
        <script src="/js/main"></script>
    </body>
</html>
*/

Installation

npm install jsonml-document

Contributors

  • Matt-Esch

MIT Licenced

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published