anarchic-gui
v0.6.0
Published
A Node and React Webpack Hyperchain Carlo GUI
Downloads
11
Readme
Anarchic GUI
A Node and React Webpack Hyperchain Carlo GUI
Install
npm i anarchic-gui
Usage
app
├───node.js
└───browser.js
node.js
const GUI = require('anarchic-gui/node') const { runDevServer, build, launch } = GUI({ browser: require.resolve('./browser') }) await build() // OR await runDevServer() // then launch()
browser.js
const { render, h } = require('anarchic-gui/browser') render(() => { return h.div('Hello world!') })
node node.js
API
Node
const GUI = require('anarchic-gui/node')
const {...} = GUI(opts)
{...}
Result of Carlo's carlo-webpackopts
browser
entry
[string]
Webpack's entry fileglobals
[object]
Entries made available as globals via Webpack's DefinePlugin
html
[object]
Options for html-webpack-pluginwebpack
[object]
Options forwebpack.config
carlo
[object]
Options for Carlo
Browser
const { render, h } = require('anarchic-gui/browser')
render(() => {
return h.div('Hello World!')
})
render
[function]
Function that takes a callback that should return an HTML or React(-like) Element which will be rendered in the Browser.h
[object]
Hyperchain (/react
) reviver instance.
const { H, h } = require('anarchic-gui/browser')
H
[function]
Hyperchain (/react
) reviver functionh
[object]
An instance ofH()
const { createElement } = require('anarchic-gui/browser')
createElement
[function]
React'screateElement