Giter VIP home page Giter VIP logo

cnode-electron's Introduction

cnode-electron

用electron 结合 react 以及material-ui
根据node中文社区提供的api制作的node中文社区客户端

Alt text Alt text Alt text Alt text Alt text Alt text

windows 64版本下载
mac 64版本下载
使用方法:
浏览器开发
1 git clone https://github.com/wq123456/cnode-electron.git
2 cd cnode-electron & npm install
3 npm run dev
4 打开浏览器 http://127.0.0.1:3000

electron 预览

1 注释掉 app/store/configureStore.js 里面的 devtools()
2 运行 npm run buildapp 重新构建app.js
3 npm start 启动 electron

发布:

1 从node_modules/electron-prebuild/dist 中复制Electron.app到任意目录
2 mac上显示包内容,找到Resources 文件,创建 app文件,然后把css ,index.html,sound,main.js,SYS_Channel.js,author.json,app.js复制到app文件中退出。(windows也有resources)
3 双击Elecron.app 即可看到效果。然后可以自行更改文件名图标等
ps: 官方的asar方法打包限制太多,不好使。 npm install 安装electron-prebuilt可能会失败,建议单独对其进行安装

最近收到打包的问题,我这边用的一种简单的办法
下载官网发布的demo然后修改
官网发布地址 https://github.com/electron/electron/releases/
比如你想在mac 上 发布应用,下载 electron-v1.3.3-darwin-x64.zip
解压后 右键 electron 显示包内容
在 Contents->Resources 创建 app 文件夹
然后把自己项目用到的依赖以及资源文件放到里面就可以
之后再去修改 electron 变成自己的应用名
windows上同理官方提供的模板中把自己的内容放在resources文件夹里
Alt text
Alt text
这种方式好处是不会受权限限制,但是因为你的源码也会暴露出来,有些敏感信息也需要去加密。所以应用上线可能还需要用其他的办法。

cnode-electron's People

Contributors

clemens-tolboom avatar fscherwi avatar galeksandrp avatar hanxie-crypto avatar icoxfog417 avatar ionicabizau avatar izuzak avatar jlord avatar kevinsawicki avatar laiso avatar phanect avatar tcyrus avatar zanesterling avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.