electron-react-boilerplate
https://www.npmjs.com/package/electron-react-boilerplate
Electron application boilerplate based on React,React Router,Webpack,React Hot Loader for rapid application development
Electronapplication boilerplate based onReact,Redux,React Router,Webpack,React Transform HMRfor rapid application development Screenshot
InstallFirst,clone the repo via git:
gitclonehttps://github.com/chentsulin/electron-react-boilerplate.gityour-project-name
And then install dependencies.
$cdyour-project-name&&npminstall
RunRun this two commandssimultaneouslyin different console tabs.
$npmrunhot-server
$npmrunstart-hot
or run two servers with one command
$npmrundev
Note: requires a node version >= 4 and an npm version >= 2. DevToolsToggle Chrome DevTools
Seeelectron-debugfor more information. Toggle Redux DevTools
Seeredux-devtools-dock-monitorfor more information. Redux Devtools WindowNow you can implement it usingremote-redux-devtoolswith aremote monitorby yourself. Externals If you use any 3rd party libraries which can't be built with webpack,you must list them in your
externals:
//putyournode3rdpartylibrarieswhichcan'tbebuiltwithwebpackhere(mysql,mongodb,andsoon..)
]
You can find those lines in the file. CSS ModulesThis boilerplate out of the box is configured to usecss-modules. All If you need global styles,stylesheets with Package
$npmrunpackage
To package apps for all platforms:
$npmrunpackage-all
Options
Use Default Ignore modules We add some module's
Building windows apps from non-windows platformsPlease checkoutBuilding windows apps from non-windows platforms. How hot-reloading works on ElectronWe usewebpack-target-electron-rendererto provide a build target for electron renderer process. Read more informationhere.
Native-like UIIf you want to have native-like User Interface (OS X El Capitan and Windows 10),react-desktopmay perfect suit for you. Maintainers
LicenseMIT ?C. T. Lin (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |