Skip to content

Repository files navigation

offline-dev-kit

Offline dev kit based on import maps and htm jsx factory. No node_modules need anymore! Full material-ui lib without bundlers!

Contribute

Important

Made by using react-declarative to solve your problems. ⭐Star and 💻Fork It on github will be appreciated

Usage

Run in command line

npm install
npm run build
npm start

Code sample

Import map

<scripttype="importmap">{"imports": {"react": "/dist/react.esm.js",
...
}}</script>

ES6 modules in modern browser

<scripttype="module">importReactfrom'react';importReactDOMfrom'react-dom';import{Scaffold,Switch}from'react-declarative';import{createMemoryHistory}from'history';importoptionsfrom'../config/navbar.js';importroutesfrom'../config/routes.js';consthistory=createMemoryHistory();constApp=()=>{consthandleNavClick=(name)=>{if(name==='home-page'){history.push('/');}elseif(name==='profiles-page'){history.push('/profiles');}};returnhtm` <${Scaffold} title="InfoLink CRM" onOptionClick=${handleNavClick} options=${options} > <${Switch} Loading=${()=>htm`<p>Checking permissions (mock)</p>`} NotFound=${()=>htm`<p>Not found(</p>`} history=${history} items=${routes} /> <//> `;};ReactDOM.render(htm`<App />`,document.getElementById('root'));</script>

Check the full source code in example folder

About

Offline dev kit based on import maps and htm jsx factory. No node_modules need anymore! Full material-ui lib without bundlers!

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages