|
|
6 سال پیش | |
|---|---|---|
| .github | 7 سال پیش | |
| app | 7 سال پیش | |
| app-ui | 7 سال پیش | |
| assets | 8 سال پیش | |
| scripts | 8 سال پیش | |
| test | 8 سال پیش | |
| .babelrc | 8 سال پیش | |
| .gitattributes | 8 سال پیش | |
| .gitignore | 7 سال پیش | |
| License.md | 8 سال پیش | |
| README.md | 6 سال پیش | |
| README_cn.md | 6 سال پیش | |
| gulpfile.js | 7 سال پیش | |
| package.json | 7 سال پیش | |
| webpack.config.js | 8 سال پیش |
Homepage: https://oldj.github.io/SwitchHosts/
SwitchHosts! is an App for managing hosts file, it is based on Electron, React, and Ant Design, CodeMirror, etc.
You can download the source code and build it yourself, or download the built version from following links:
On macOS you can install SwitchHosts! by brew cask:
brew cask install switchhosts
Thanks to @gobinathm and @iamybj for updating the brew cask version.
On Windows you can install SwitchHosts! by scoop:
scoop install switchhosts
Thanks to @batkiz for updating the scoop version.
SwitchHosts! stores data at ~/.SwitchHosts (Or folder .SwitchHosts under the current user's home path on Windows), the ~/.SwitchHosts/data.json contains data, while the ~/.SwitchHosts/prefereces.json contains preferences info.
./, run npm install to install dependented librariesChange to the folder ./app, run npm install again
npm install
cd app && npm install && cd ..
./, run npm run dll to build common files./, run npm run buildChange to the folder ./, run npm start, the App should start
# create dll file
npm run dll
# build
npm run build
# start
npm start
# or start in developer mode
npm run dev
It is recommended to use electron-packager for packaging.
# install electron-packager for use from cli
npm install electron-packager -g
Go to the ./ folder, run npm run pack . The packaged file will be the ./dist folder.
This command may take several minutes to finish when you run it the first time, as it needs time to download dependent files. You can download the dependencies manually here, or Taobao mirror, then save the files to ~/.electron. You can check the Electron Docs for more infomation.
# pack
npm run pack # the packed files will be in ./dist
# or pack for a special platform
npm run pack-mac # pack for macOS, the packed files will be in ./dist
npm run pack-win # pack for Windows, the packed files will be in ./dist
After packaging, you can make a zip file by running the following command.
# zip
npm run zip # the zipped files will be in ./dist
SwitchHosts! is a free and open source software, it is released under the MIT license.