@brtmvdl/frontend

2.0.1 • Public • Published

@brtmvdl/frontend

Easy Front-end Node.js library

See an example

GitHub Workflow Status (with event) npm github/stars

social & donate

Donate - Telegram - Discord

how to install

# bash

npm i @brtmvdl/frontend
mv node_modules libs

how to use

<!-- index.html -->

<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Front-end</title>
  <script type="importmap">
    {
      "imports": {
        "@brtmvdl/frontend": "./libs/@brtmvdl/frontend/src/index.js"
      }
    }
  </script>
</head>

<body>
  <div id="app"></div>
  <script type="module" src="./index.js"></script>
</body>
</html>
// index.js

import { HTML, nInput, nButton } from '@brtmvdl/frontend'

const app = HTML.fromId('app')

const input = new nInput()
input.setPlaceholder('input')
app.append(input)

const button = new nButton()
button.setText('button')
button.on('click', () => window.alert(`value: ${input.getValue()}`))
app.append(button)

license

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @brtmvdl/frontend

Weekly Downloads

6

Version

2.0.1

License

MIT

Unpacked Size

199 kB

Total Files

74

Last publish

Collaborators

  • brtmvdl