One line command turns any website into desktop software

Time:2021-9-18

One line command turns any website into desktop software

In the past, developing a desktop software took a lot of manpower and time. Now, with the emergence of electron, the development threshold is greatly simplified. Today, I’d like to introduce a tool that allows you to turn a website into an installable desktop software in five minutes.

Required tools

The effect is as follows

One line command turns any website into desktop software
One line command turns any website into desktop software

Installation tools

  1. download

    # gitee
    git clone https://gitee.com/wallace5303/electron-egg.git
  2. install

    #Improve installation speed and use domestic image
    npm config set registry https://registry.npm.taobao.org
    
    #Enter the directory. / electron egg/
    npm install
  3. Configure web site

    #Edit file 
    ./electron/config.js
    
    #Configure site address
    remoteUrl: {
        Enable: true, // enable: true
        url: ' https://discuz.chat/ '// any web address
    },
  4. Packaged as executable programs (windows, MacOS, Linux) are all supported

    #Package (Windows version)
    NPM run build-w (32-bit)
    NPM run build-w-64 (64 bit)
    
    #Packaging (Mac version)
    npm run build-m
    NPM run build-m-arm64 (M1 chip architecture)
    
    #Packaging (Linux version)
    npm run build-l
  5. The installation package is here

    . / out / installation package. Exe (DMG, DEP, etc.)
  6. Come and try the effect^_^

More usage

View the electron egg tutorial