当前位置:网站首页>1. Construction of electron development environment
1. Construction of electron development environment
2022-04-23 11:40:00 【Curious rookie】
precondition : On the computer node.js The environment is normal ;
# see node edition
node -v
# see node Package management tool version
npm -v
# View default warehouse
npm config ls
see npm Warehouse , Domestic image is recommended ;
npm config set registry https://registry.npm.taobao.org
One 、 Create a new development directory and initialize the project ( Global installation ignores this step )
npm init --yes
Will generate a package.json file
Two 、 install electron rely on
npm install electron --save-dev
# Global installation
npm install -g electron
Command specification :
npm install xxx : Install a module To local project node_modules, But the information of the installation package will not be added to package.json file
npm install xxx --save: Install a module To local project node_modules Folder , At the same time, add relevant module dependencies to package.json Of documents dependencies in
npm install xxx --save-dev: Install a module To local project node_modules Folder , At the same time, add relevant module dependencies to package.json Of documents devDependencies
npm install xxx -g: And npm install module equally , It's just module The installation of is global
npm install xxx --save -g : And npm install module --save equally , It's just module The installation of is global
npm install xxx --save-dev -g: And npm install module --save-dev equally , It's just module The installation is
3、 ... and 、 Check the installation results
# One out of two , The global installation uses the first command
npx electron -v
./node_modules/.bin/electron -v
If you don't see the version number , Just reinstall
Four 、 see electron Interface
# Global installation uses
npx electron
./node_modules/.bin/electron
Default interface
版权声明
本文为[Curious rookie]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231135422873.html
边栏推荐
猜你喜欢
PSCP 基本使用
Maker education for primary and middle school students to learn in happiness
让中小学生在快乐中学习的创客教育
The listing of saiweidian Technology Innovation Board broke: a decrease of 26% and the market value of the company was 4.4 billion
论坛系统数据库设计
Summary of the relationship among GPU, CUDA and cudnn
Redis learning 5 - high concurrency distributed lock practice
解析幼儿教育中steam教育的融合
微型机器人的认知和研发技术
laravel编写Console脚本
随机推荐
Nacos Foundation (6): Nacos configuration management model
Database design of simple voting system
项目实训-火爆辣椒
Usage record of map < qstring, bool >
qt 64位静态版本显示gif
Cognition and R & D technology of micro robot
创客教育中的统筹方案管理模式
激活函数之sigmoid函数
Tensorflow uses keras to create neural networks
解决由于找不到amd_ags_x64.dll,无法继续执行代码。重新安装程序可能会解决此问题,地平线(Forza Horizon 5)
QT 64 bit static version display gif
Laravel always returns JSON response
Interpretation of 2022 robot education industry analysis report
laravel编写Console脚本
My creation anniversary
IM 体系结构:CPU架构:SIMD向量处理(IM-2.3)
oh-my-lotto
科创人·派拉软件CEO谭翔:零信任本质是数字安全,To B也要深研用户心智
The fourth chapter is the enable and disable columns of IM enabled fill objects (Part III of im-4.3)
Redis optimization series (II) redis master-slave principle and master-slave common configuration