1.0.2 • Published 4 years ago

small-forge v1.0.2

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

small-forge

version downloads

A small npm package to generate HTML easily.

Installing

npm i small-forge

Design goals

  • the fewest/smallest dependencies possible (I am one of those people who hate having a lot of small libs to use another bigger lib)
  • simplicity
  • use and abuse of ...args
  • documentation everywhere

Examples

const sf = require('small-forge');
const [div, h1, p, img] = sf.forgeSomeElements(
    'div', { className: 'cool-div' },
    'h1',  { textContent: 'Hello GitHub!' },
    'p',   { className: 'big-paragraph', textContent: 'A small package to generate HTML easily' },
    'img', { src: 'public/img/sf.png', alt: 'small-forge logo' }
);

sf.forgeStyle(div, {
    opacity: 1.0,
    transition: 'opacity 1s'
});

sf.forgeHierarchy(
    div, [
        h1, p, img
    ]
);
1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago