JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 43
  • Score
    100M100P100Q55240F
  • License MIT

JavaScript Vanilla library

Package Exports

  • @wappaa/jv

Readme

@wappaa/jv

JavaScript Vanilla (JV) — A lightweight JavaScript library for building client-side applications.

Installation

npm install @wappaa/jv

Usage

/* if import from @wappaa/jv not work then you can add to index.html this code  
    <script type="importmap">
      {"imports": {"@wappaa/jv": "/node_modules/@wappaa/jv/dist/index.js"}}
    </script>
*/
    
import  "@wappaa/jv";

// Tag functions (div, h1, p, button, etc.) are globally available after this import

function ComponentName() {

    return div("hello jv");
  
}

document.body.appendChild(ComponentName());

// Reactive counter example:

import { createSignal } from "@wappaa/jv";

function Counter() {
  const [count, setCount] = createSignal(0);

  return div({ class: "counter" },
    h1("JV Reactive Framework"),
    p(() => `Count is: ${count()}`),           // Reactive text updates
    button({ onClick: () => setCount(count() + 1) }, "Increment")  // Event handler
  );
}

document.body.appendChild(Counter());