pl0x-suite
v0.0.0
Published
A way of building bundle-less, fine-grained, front-end web apps.
Downloads
0
Maintainers
Readme
pl0x-suite
A way of building bundle-less, fine-grained, front-end web apps.
pl0x-suite is a collection:
dist/pl0x.mjs- Reactive state management which replaces mobx.dist/history-pl0x.mjs- Reactive history to be used withpl0x.dist/routing-pl0x.mjs- Reactive routing usingpl0x.dist/hyperpl0x.mjs- A custom implementation ofhyperscriptwith support for es modules, and it supports these props:onmount,unmount,disabled,checked,class.dist/jsx-tag.mjs- Exposes thehtmltemplate tag literal by combininghyperpl0xwithhtm.
If you would like to use JSX instead of html template tag literals, you can do so using the jsx-convert package which is not part of the suite.
Each tool in the suite is a file in the dist folder which can be imported individually using one of these commands:
import {reactive} from "pl0x-suite/dist/pl0x.mjs";
import {history} from 'pl0x-suite/dist/history-pl0x.mjs'
import {registerRoute} from 'pl0x-suite/dist/routing-pl0x.mjs'
import hyperscript from "pl0x-suite/dist/hyperpl0x.mjs";
import html from 'pl0x-suite/dist/jsx-tag.mjs'Recommended Web App Structure
This is the recommended way to use pl0x-suite:
- Your frontend codebase should have these folders:
node_modules,build - Use
absolute-import-paths --glob "build/**/*.{js,mjs}"in your build step to convert bare import paths into absolute ones by prepending them with/node_modules/. This will cause the browser to make requests to/node_moduleson the same origin. - Expose
/node_modulesfrom your origin server.
