快速启动一个Electron + TypeScritp + React的脚手架, 而且提供了React-Router/ React-Redux/ connected-react-router,
使用electron-builder打包发布一个桌面应用。html
-app -main electron相关文件 main-process -renderer 页面相关 render-process -assets 静态资源(放打包用的icon或者electron tray使用的icon) -build renderer 打包后文件存放地址 -config 存放相关webpack.config配置文件 -dist 存放 electron-build 打包的app, 最终的应用程序 -public renderer 使用的html模板 -script npm运行renderer相关 -main.js 由npm命令编译生成的electron入口文件, 不须要管。 若是须要改它的文件位置, 须要在package.json的main中 对应修改 -tsconfig.json ts编译配置 -tslint.json tslint 配置
# Clone this repository git clone https://github.com/Leskd/electron-react-typescript.git <your-project-name> # Go into the repository cd <your-project-name> # Install dependencies npm install # Run the app npm start
# dev npm run start # Local build and test npm run build npm run local # release ## window npm run release-win ## mac npm run release-mac
github地址:https://github.com/Leskd/elec...(欢迎试用star与fork, 据说点star的人都是好人!!) 感谢
若是有issue, 请提交issue,我会尽快修改。react
PS: TypeScript-React 是基于 React官方create-react-app, 后面若是须要能够去掉这个配置,本身搭更简洁的配置。webpack