当前位置:网站首页>[efficient] the most powerful development tool, ctool, is a compilation tool

[efficient] the most powerful development tool, ctool, is a compilation tool

2022-06-12 04:21:00 Night owls chasing dreams

Reading guide

one can't make bricks without straw , Programmers can't live without “ wheel ”, I have always wanted to integrate some of my tools , But I don't want to rebuild the wheel , So much open source , It's not very good to bring it .
see , For most of the day , Discovery artifact Ctool. Today I will compile my own Ctool And compile 、 Deploy .

 Insert picture description here

development environment

Version number describe
operating system Win11-21H2 Internal version number 22000.588
node -vv12.18.3
npm -v6.14.6

Compile step pit

The code download

REM  from github Server download ( Frequent download failures )
git clone https://github.com/baiy/Ctool

REM  from github Image server download 
git clone https://hub.fastgit.xyz​​/baiy/Ctool

REM  Xiaobian gitee download ( The following exception has been resolved )
git clone https://gitee.com/yeahmao/front_end__ctool

Solve compilation errors

 Insert picture description here
file package-lock.json in , It includes some through git+ssh visit github Configuration of .
take "resolved": "git+ssh://[email protected]/ Replace with "resolved": "https://, And then execute it again npm install You can compile normally .

ps: The above compilation problems , May be through git-ssh To configure git Then we can solve it , Not tested .

Deploy to server

Compilation options problem

ctool The official compilation order is npm run build -adapter=[chrome|edge|utools|firefox|web], I use commands separately npm run build -adapter=chrome and npm run build Compile .

belt -adapter=chrome The file compiled from the command line is a little larger than the file without parameters , But it cannot be opened locally index.html visit .

Deploy to ngnix On

take dist Copy all files in the directory to ngnix In the directory of .

For example, it's made up by Xiaobian ngnix Working directory is /usr/share/nginx/html_my_web, Copy files to directory /usr/share/nginx/html_my_web/ctool that will do . such , Direct access http://www.l0l.fun/ctool/index.html perhaps http://www.l0l.fun/ctool/tool.html That's all right. .

 Insert picture description here

Reference material

  • github Official website : https://github.com/baiy/Ctool
  • github Use the address online : https://baiy.github.io/Ctool/
  • Small make up gitee Address :https://gitee.com/yeahmao/front_end__ctool
  • Xiaobian official website tool address ( The first visit was slow ):http://www.l0l.fun/ctool/tool.html
原网站

版权声明
本文为[Night owls chasing dreams]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206120416141002.html