joro

1.0.5 • Public • Published

Load dom nodes and strings like dependencies with no duplicates



Installation

npm install joro --save

Why make this?

  • JSS is over complicated for small projects
  • Its easy to add styles for functional components
  • its tiny, simple functional and i love using it.

Examples

var html = require('nanohtml')
var joro = require('joro');

var styles = new joro();

function HeaderComponent(){
    styles.add("HeaderComponent", `
        h1 { color: hotpink }
    `)
    var el = html`
        <h1>Hello planet</h1>
    `
    document.body.appendChild(el)
}

congratulation its a functional component 🎉

You can add HTML nodes on route change of styles, mount points or anything! 🌈

var page = require('pagejs')
var styles = new joro();

page('/user', () => {
   styles.add("HeaderComponent", `
       .user-profile { color: hotpink }
   `)
   loadTheUI();
})

Package Sidebar

Install

npm i joro

Weekly Downloads

4

Version

1.0.5

License

ISC

Unpacked Size

32.7 kB

Total Files

9

Last publish

Collaborators

  • stagfoo