node
version >=14.17.1- windows os only: windows-build-tools have been installed
- mac os only: Command Line Tools (CLT) for Xcode: xcode-select --install, developer.apple.com/downloads or Xcode 3
- arch linux os only: base-devel have been installed
Clone the repository
git clone [email protected]:fe-x/gm_electron_x_mes.git
# or git clone https://code.guanmai.cn/fe-x/gm_electron_x_mes.git
Switch to the repo folder
cd gm_electron_x_mes
Install dependencies (If you are blocked by GFW, please read the QA section)
yarn install
Runs the app in the development mode
yarn start
Building an electron application is restricted by the operating system. You can only build the electron desktop application of the system on the corresponding system, but it is possible to build it through a virtual machine and docker.
yarn dist
Note: If you have added these plugins to your editor, you rarely need to manually execute any of the above code specification related commands.
The vscode editor extensions listed below can enhance your development experience, and other editors should have similar plugins.
- css modules
- eslint
- stylelint
- prettier
- tailwindcss
- vscode-styled-components
- GitLens โ Git supercharged
- jest
- dotenv
- npm Dependency Links
- SVG Language Support
Q: yarn upgrade
does not update package.json
A: ref yarnpkg/yarn#2042
yarn global add npm-check-updates
ncu -u
yarn install --check-files
ncu -u
Q: What to do if the dependencies cannot be downloaded due to network problems
A: ref https://npm.taobao.org/mirrors
First execute the following command to add the mirror, and then use yarn install
to download the dependencies
yarn config set registry https://registry.npm.taobao.org -g
yarn config set disturl https://npm.taobao.org/dist -g
yarn config set electron_mirror https://npm.taobao.org/mirrors/electron/ -g
yarn config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/ -g
yarn config set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs/ -g
if it still does not work, you can try to use yarn --ignore-optional
to skip the download of optional dependencies