dglux / dglux-react-widget

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

run the example

  • install dependency yarn install
  • build the react sample app yarn build
    • file will be generated in www/react-app folder
  • start a local server yarn server

the example will be served at http://localhost:8423/react-app/example.html

use this dglux build in your own project

import DGLuxPage from "dglux-react-widget";
...

render() {
 return (
  <DGLuxPage.contextType.Provider value={{dgluxBaseUrl:"http://localhost/dglux5/"}}>
    <DGLuxPage project='example' page='page1.dg5'/>
  </DGLuxPage.contextType.Provider>
 );
}
  • www/dglux5 is the main directory for dglux, it can be moved to anywhere on the server. And its url should be used as dgluxBaseUrl
  • www/proj is the directory to store projects files, it can also be moved to anywhere on the same server, its relative path from dgluxBaseUrl should be put in ${dgluxBaseUrl}/dgconfig.json

About


Languages

Language:JavaScript 96.5%Language:CSS 3.2%Language:HTML 0.1%Language:TypeScript 0.1%