refactor: 添加gitee github徽章
parent
274ce7968c
commit
1e50e5058b
63
README.md
63
README.md
|
@ -38,7 +38,9 @@ recaptcha 图片验证码加速
|
||||||
暂时只支持windows
|
暂时只支持windows
|
||||||
|
|
||||||
#### 1.1 下载安装包
|
#### 1.1 下载安装包
|
||||||
[点此去下载](https://dev-sidecar.docmirror.cn/update/DevSidecar-1.0.2.exe)
|
[点此去下载](https://dev-sidecar.docmirror.cn/update/DevSidecar-1.0.2.exe)
|
||||||
|
安装后打开:
|
||||||
|

|
||||||
#### 1.2 安装根证书
|
#### 1.2 安装根证书
|
||||||
第一次打开会提示安装根证书
|
第一次打开会提示安装根证书
|
||||||
#### 1.3 开始加速吧
|
#### 1.3 开始加速吧
|
||||||
|
@ -46,69 +48,12 @@ recaptcha 图片验证码加速
|
||||||
`Download ZIP`、`Release` 下载试试,体验秒下的感觉
|
`Download ZIP`、`Release` 下载试试,体验秒下的感觉
|
||||||
比如去下载它: https://github.com/greper/d2-crud-plus/archive/master.zip
|
比如去下载它: https://github.com/greper/d2-crud-plus/archive/master.zip
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
#### 开启前vs 开启后
|
#### 开启前vs 开启后
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
### 2、命令行方式
|
|
||||||
此方式适用于nodejs开发者
|
|
||||||
|
|
||||||
1. 安装与启动
|
|
||||||
```shell
|
|
||||||
git clone https://gitee.com/docmirror/dev-sidecar.git
|
|
||||||
cd ./dev-sidecar/packages/core
|
|
||||||
npm install
|
|
||||||
npm run start
|
|
||||||
|
|
||||||
#或使用cnpm
|
|
||||||
cnpm install
|
|
||||||
npm run start
|
|
||||||
|
|
||||||
#或使用yarn
|
|
||||||
yarn install
|
|
||||||
npm run start
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
输出
|
|
||||||
```
|
|
||||||
CA Cert saved in: C:\Users\Administrator\.dev-sidecar\dev-sidecar.ca.crt
|
|
||||||
CA private key saved in: C:\Users\Administrator\.dev-sidecar\dev-sidecar.ca.key.pem
|
|
||||||
|
|
||||||
dev-sidecar启动端口: 1181
|
|
||||||
代理已开启, 127.0.0.1 1181
|
|
||||||
|
|
||||||
```
|
|
||||||
启动后会自动设置系统代理、npm代理
|
|
||||||
|
|
||||||
2. 设置信任根证书
|
|
||||||
|
|
||||||
第一次启动时会本地随机生成一个根证书放在此目录下(由于此证书是本地随机生成的,所以信任它是安全的)
|
|
||||||
```
|
|
||||||
# 你的Home路径如果有修改,输出会不一样,请按照实际日志输出路径查看
|
|
||||||
CA Cert saved in: C:\Users\Administrator\.dev-sidecar\dev-sidecar.ca.crt
|
|
||||||
```
|
|
||||||
|
|
||||||
windows用户安装根证书
|
|
||||||
```
|
|
||||||
start %HOMEPATH%/.dev-sidecar/dev-sidecar.ca.crt
|
|
||||||
或者
|
|
||||||
打开`C:\Users\Administrator\.dev-sidecar\`文件夹,双击`dev-sidecar.ca.crt`
|
|
||||||
```
|
|
||||||
依次点击安装证书->所有用户->将所有证书都放入下列存储->受信任的根证书颁发机构->确定,下一步,确定即可
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. 开始加速吧
|
|
||||||
去github上`Download ZIP`、`Release` 下载试试,体验秒下的感觉
|
|
||||||
|
|
||||||
比如去下载它: https://github.com/greper/d2-crud-plus/archive/master.zip
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 最佳实践
|
## 最佳实践
|
||||||
|
|
||||||
把dev-sidecar一直开着就行了
|
把dev-sidecar一直开着就行了
|
||||||
|
|
|
@ -53,13 +53,14 @@ export default {
|
||||||
return {
|
return {
|
||||||
menus: [
|
menus: [
|
||||||
{ title: '首页', path: '/index', icon: 'home' },
|
{ title: '首页', path: '/index', icon: 'home' },
|
||||||
{ title: '加速服务', path: '/server' },
|
{ title: '加速服务', path: '/server', icon: 'thunderbolt' },
|
||||||
{ title: '系统代理', path: '/proxy' },
|
{ title: '系统代理', path: '/proxy', icon: 'deployment-unit' },
|
||||||
{
|
{
|
||||||
title: '应用',
|
title: '应用',
|
||||||
path: '/plugin',
|
path: '/plugin',
|
||||||
|
icon: 'api',
|
||||||
children: [
|
children: [
|
||||||
{ title: 'NPM加速', path: '/plugin/node' }
|
{ title: 'NPM加速', path: '/plugin/node', icon: 'like' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import lodash from 'lodash'
|
import lodash from 'lodash'
|
||||||
import { ipcRenderer } from 'electron'
|
import { ipcRenderer, shell } from 'electron'
|
||||||
|
|
||||||
const invoke = (api, args) => {
|
const invoke = (api, args) => {
|
||||||
return ipcRenderer.invoke('apiInvoke', [api, args]).catch(err => {
|
return ipcRenderer.invoke('apiInvoke', [api, args]).catch(err => {
|
||||||
console.error('api invoke error:', err)
|
console.error('api invoke error:', err)
|
||||||
|
@ -20,7 +21,10 @@ const apiObj = {
|
||||||
ipcRenderer.on(channel, callback)
|
ipcRenderer.on(channel, callback)
|
||||||
},
|
},
|
||||||
invoke,
|
invoke,
|
||||||
send
|
send,
|
||||||
|
openExternal (href) {
|
||||||
|
shell.openExternal(href)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let inited = false
|
let inited = false
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<ds-container>
|
<ds-container class="page_index">
|
||||||
<template slot="header">
|
<template slot="header">
|
||||||
给开发者的辅助工具
|
给开发者的辅助工具
|
||||||
<span>
|
<span>
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div v-if="status" style="display: flex; align-items:center;justify-content:space-around;flex-direction: row">
|
<div v-if="status" style="margin-top:50px;display: flex; align-items:center;justify-content:space-around;flex-direction: row">
|
||||||
<div style="text-align: center">
|
<div style="text-align: center">
|
||||||
<div class="big_button">
|
<div class="big_button">
|
||||||
<a-button shape="circle" :type="startup.type()" :loading="startup.loading" @click="startup.doClick">
|
<a-button shape="circle" :type="startup.type()" :loading="startup.loading" @click="startup.doClick">
|
||||||
|
@ -36,13 +36,19 @@
|
||||||
<a-icon slot="unCheckedChildren" type="close"/>
|
<a-icon slot="unCheckedChildren" type="close"/>
|
||||||
</a-switch>
|
</a-switch>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
</a-form>
|
</a-form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<setup-ca title="安装证书" :visible.sync="setupCa.visible" @setup="handleCaSetuped"></setup-ca>
|
<setup-ca title="安装证书" :visible.sync="setupCa.visible" @setup="handleCaSetuped"></setup-ca>
|
||||||
|
<div slot="footer">
|
||||||
|
<div class="flex-l-r star" style="padding:10px;">
|
||||||
|
<div>如果它解决了你的问题,请不要吝啬你的star哟! <a-icon type="smile" theme="outlined" /></div>
|
||||||
|
<a @click="openExternal('https://gitee.com/docmirror/dev-sidecar')"><img src='https://gitee.com/docmirror/dev-sidecar/badge/star.svg?theme=dark' alt='star'/></a>
|
||||||
|
<a @click="openExternal('https://github.com/docmirror/dev-sidecar')"><img alt="GitHub stars" src="https://img.shields.io/github/stars/docmirror/dev-sidecar?logo=github"></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</ds-container>
|
</ds-container>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
@ -225,17 +231,28 @@ export default {
|
||||||
doCheckUpdate (fromUser = true) {
|
doCheckUpdate (fromUser = true) {
|
||||||
this.update.fromUser = fromUser
|
this.update.fromUser = fromUser
|
||||||
this.$api.update.checkForUpdate(this.update)
|
this.$api.update.checkForUpdate(this.update)
|
||||||
|
},
|
||||||
|
openExternal (url) {
|
||||||
|
this.$api.openExternal(url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style lang="scss">
|
||||||
.page_index {
|
.page_index {
|
||||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
.star {
|
||||||
-moz-osx-font-smoothing: grayscale;
|
>*{
|
||||||
color: #2c3e50;
|
margin-right:10px;
|
||||||
padding-top: 60px;
|
}
|
||||||
|
a {
|
||||||
|
height: 21px;
|
||||||
|
|
||||||
|
img {
|
||||||
|
height: 21px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.big_button > button {
|
.big_button > button {
|
||||||
|
@ -245,11 +262,10 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.big_button > button i {
|
.big_button > button i {
|
||||||
size: 40px
|
size: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.ant-form-item {
|
div.ant-form-item {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -4,6 +4,17 @@
|
||||||
border-top:#eee 1px solid;
|
border-top:#eee 1px solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.flex-l-r{
|
||||||
|
align-content: center;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
align-items: center
|
||||||
|
}
|
||||||
|
.flex-l-r>a{
|
||||||
|
align-content: center;
|
||||||
|
display: flex;
|
||||||
|
align-items: center
|
||||||
|
}
|
||||||
|
|
||||||
.md-mr-5{margin-right: 5px;}
|
.md-mr-5{margin-right: 5px;}
|
||||||
.md-mr-10{margin-right: 10px;}
|
.md-mr-10{margin-right: 10px;}
|
||||||
|
|
Loading…
Reference in New Issue