0.0.4 • Published 1 year ago

fluxus-js v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Fluxus-js

Fast and simple JS Framework

Installation

  npm install fluxus-js
  yarn add fluxus-js
  pnpm add fluxus-js

Get Started

  // config.js you can edit it in node_modules/fluxus.js/components/
  const confing = {
    workPath: "src", // set work path
  }
  # Start Development Server
  npx fluxusDev path # set path to app.ts file
  # files automatically building from *.ts to *.js and starting using in index.html
  # Build All Project
  npx fluxusBuild # no arguments
  # you get folder "dist" with "main.js", "index.html" and other non-script files

Usage

  <!-- index.html -->
  ...
  <body>
    <div id="app"></div>
    <script type="module" src="./main.js"></script> <!-- set path where tsc will compile files -->
  </body>
  ...
  // app.ts
  import fluxus from 'fluxus-js'


  const node = {
    tag: "div",
    children: [
      {
        tag: "div",
        props: {
          style: "font-size: 30px"
        },
        children: [
          {
            tag: "button",
            props: {
              onClick: 'console.log("привет!")'
            },
            children: "Нажми на меня!"
          }
        ]
      }
    ]
  }

  const app = new fluxus(node, document.getElementById("app")); // possible not to define anything
  app.render(); // also you can set new node and new parent
0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago