electron

How to add secret variable as task environment variable in VSTS

寵の児 提交于 2019-12-01 17:23:43
This documentation states that secret variables are Not decrypted into environment variables. So scripts and programs run by your build steps are not given access by default. One of my build tasks require that an environment variable be set that is stored in a secret variable. Does this mean it's impossible to do this using secret varaibles in VSTS? If not, how do I do this? For further background, I'm trying to code sign my electron app using electron-builder. It requires that two environment variables be set: CSC_LINK and CSC_KEY_PASSWORD . One of these is the password to a code signing

Electron使用方法

北城余情 提交于 2019-12-01 15:54:00
1.把npm的仓库切换到国内taobao仓库: C:\User\anenyang>npm config set registry "https://registry.npm.taobao.org/" 2.安装: C:\User\anenyang>npm install -g electron 3.运行与调试:(ctrl+shift+i) C:\User\anenyang>AppData\Roaming\npm\node_modules\electron\dist\electron.exe path-to-app AppData\Roaming\npm\node_modules\electron\dist\electron.exe D:\projects\sjbox_pc 4.打包: electron-packager <应用目录> <应用名称> <打包平台> --out <输出目录> <架构> <应用版本> d:\project\sjbox_pc>electron-packager . Moon --win --out ../sjbox_pc_Client --arch=x64 --app-version=1.0.0 --electron-version=2.0.5 注意这里是在工程目录下 5.print 主进程console.log输出在终端 渲染进程console

Electron初识之路

家住魔仙堡 提交于 2019-12-01 15:18:32
1.名词解释: nodejs :nodejs相当于 jvm, vs等, 它是一个运行平台, 只不过它运行的是javascript语言而已,就像vs可以解释、编译、运行c++代码一样 electron :是一个能使用传统前端技术(Nodejs, Javascript, HTML, CSS)开发一个跨平台桌面应用的框架。这里所说的桌面应用指的是在Windows、OSX及Linux系统上运行的程序。可以把它理解为一个本地的、类似浏览器的壳子,用以展示js、html、css描述的界面 初识 electron: https://blog.csdn.net/wang839305939/article/details/80741100 2.环境搭建 安装 vscode https://blog.csdn.net/HelloZEX/article/details/84029810 linux版本下载地址: https://code.visualstudio.com/Download(deb包下载) https://www.cnblogs.com/longyuan-z/p/7739864.html(deb包安装方法) 安装nodejs (注意版本) https://blog.csdn.net/yt_php/article/details/90105880 https://blog.csdn.net

Exclude some folders, while doing electron-packager . --asar

半腔热情 提交于 2019-12-01 13:29:44
I use 'electron-packager . --asar' command to package my project folder. but there are some folders which must not be included while packaging. Is it possible to exclude some of folders? If so, I would like to include those folders in exe file path so that the user can manage their files. Is there any way to do this? Thank you in advance! Is it possible to exclude some of folders? Yes, you can do it with ignore You can use --ignore to ignore files and folders via a regular expression (not a glob pattern). Examples include --ignore=.gitignore or --ignore=".git(ignore|modules)". Take a look at

electron教程(番外篇一): 开发环境及插件, VSCode调试, ESLint + Google JavaScript Style Guide代码规范

半城伤御伤魂 提交于 2019-12-01 13:26:17
我的electron教程系列 electron教程(一): electron的安装和项目的创建 electron教程(番外篇一): 开发环境及插件, VSCode调试, ESLint + Google JavaScript Style Guide代码规范 electron教程(二): http服务器, ws服务器, 子进程管理 electron教程(三): 使用ffi-napi引入C++的dll electron教程(四): 使用electron-builder或electron-packager将项目打包为可执行桌面程序(.exe) 引言 这一篇将介绍: 如何部署开发环境 VSCode . 如何使用vscode调试启动项目. 如何使用 ESLint 插件来检查代码, 代码风格规范使用 Google JavaScript Style Guide ( 官方英文 , 第三方中文翻译 ). VSCode插件推荐. 安装VSCode 通过 VSCode官网 下载, 可以安装在任意盘符下任意位置. 安装完成后, 就可以使用VSCode打开并编辑 main.js 了. 你还可以使用VSCode打开并编辑 .html , .json 等文件, 甚至是 .txt , .md 等文件. 使用VSCode调试启动项目 1. 部署node.js+electron环境 electron教程(一):

How do I use Dojo Toolkit in an Electron application?

坚强是说给别人听的谎言 提交于 2019-12-01 13:12:11
问题 I'm exploring Electron and I've run into a roadblock. I can't figure out how to load the Dojo Toolkit and use it in Electron. For example, here is the simple "Hello World" for Dojo: <!DOCTYPE html> <html> <head> <title>Tutorial: Hello Dojo!</title> </head> <body> <h1 id="greeting">Hello</h1> <!-- load Dojo --> <script src="//ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js" data-dojo-config="async: true"></script> <script> require([ 'dojo/dom', 'dojo/dom-construct' ], function (dom,

Electron and serial ports

人盡茶涼 提交于 2019-12-01 08:43:47
I have tried everything to try to get Electron to work with the PCs serial port. Followed all instructions for the serialport (even tried building native modules) without luck. Has anyone had any luck getting Electron to work with serial ports? If so please share your wisdom. Here are the commands we run after doing npm install (or after upgrading electron or node-serial). on Mac rm -rf node_modules/serialport/build/* node_modules/.bin/electron-rebuild -w serialport -f ls node_modules/serialport/build/Release on Win rmdir /S /Q node_modules\serialport\build\ node_modules\.bin\electron-rebuild

How to use html templates in electron framework?

孤街浪徒 提交于 2019-12-01 08:02:51
I need to build a cross platform app with multiple windows. So I would like to know how to use html templates in electron. 17xande Based on a similar question and what I've seen, there's no built in html template language in Electron, which is actually great because it allows you to use any other template language. I'm currently playing with ejs in Electron. Below is my index.ejs template file: <html lang="en"> <head> <title>The Index Page</title> </head> <body> <h1>Welcome, this is the Index page.</h1> <% if (user) { %> <h3>Hello there <%= user.name %></h3> <% } %> </body> </html> And below

Electron + React + Node.js + ES6 开发桌面软件

久未见 提交于 2019-12-01 07:21:02
Electron + React + Node.js + ES6 开发桌面软件 1、概述 近来工作上需要做一款 PC 上的软件,这款软件大体来讲是类似 PPT 的一款课件制作软件。由于我最近几年专注于移动 App 的开发,对 PC 端开发的了解有些滞后。所以我首先需要看看,在 PC 上采用什么框架能够顺利完成我的工作。 我的目标是,在完成这款软件的同时能够顺便学习一下比较流行的技术。在经过前期技术调研后,我明确了实现这款软件所需要的技术条件: 不采用 C++ 方面的类库,比如 MFC、Qt、DuiLib 等等; 本来想试试 C# 来开发,但 C# 对我来说,需要从头学习,如果学 C# 只为了开发这一款软件,后续再无用武之地,那么对我来说,学习的驱动力不大; 之前学习了移动端的开发库 React Native ,所以对 React 组件化的开发方式颇有好感,所以想尝试用 React 来开发。 2、技术路线 基于以上几点考虑,我通过搜索了解了 Electron 这个框架,果断采用了下面的技术路线: Technical 用途 文档官网 Electron 包装 HTML 页面,为网页提供一个本地运行环境 http://electron.atom.io/docs/ React 用 React 组件来写页面 https://facebook.github.io/react/ Node.js 为

使用create-react-app 创建 Electron 桌面应用

帅比萌擦擦* 提交于 2019-12-01 07:20:34
使用create-react-app 创建 Electron 桌面应用 如何创建一个最简单的electron桌面应用? electron-quick-start git clone https://github.com/electron/electron-quick-start.git cd electron-quick-start npm i // 运行应用 npm start 这个时候就可以看到应用跑起来了。 react+electron 接下来使用 create-react-app 创建 electron 项目。 npm i -g create -react -app create -react -app electron -react cd electron -react 安装electron 以及添加启动命令 npm i -S electron // 在package.json 中添加electron 启动命令 和 编译命令 "electron-start" : "electron . --env dev" , "electron-build" : "npm run build && electron . --env build" 在react的最外层目录创建electron的主进程文件 main.js, 内容直接拷贝 electron-quick-start