bahrus / be-functional

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

be-functional

Playwright Tests

How big is this package in your project?

Working like it's '95

<button be-functional='{
    "click": {
        "scriptRef": "my-script",
        "fn": "yawnAndStretch"
    }
}'>Tumble out of bed</button>
...
<script nomodule id=my-script be-exportable>
export const yawnAndStretch = e => {
    e.target.textContent = 'Try to come to life';
}
</script>

Running locally

  1. Do a git clone or a git fork of repository https://github.com/bahrus/be-functional
  2. Install node.js
  3. Run "npm install" from location of folder created in step 1.
  4. Run npm run serve. Open browser to http://localhost:3030/demo/

Using from ESM Module:

import 'be-functional/be-functional.js';

Using from CDN:

<script type=module crossorigin=anonymous>
    import 'https://esm.run/be-functional';
</script>

About

License:MIT License


Languages

Language:TypeScript 43.1%Language:JavaScript 34.3%Language:HTML 22.7%