使用国内的源
==============================
国内的Maven源
------------------------------
由于国内访问官方maven仓库的速度比较慢,所以可以尝试使用oschina提供的maven仓库镜像
添加mirror节点到settings.xml里的mirrors即可。比如 ::
tencent-cloud
central
Tencent Cloud Mirror.
http://mirrors.cloud.tencent.com/nexus/repository/maven-public/
aliyun
central
Aliyun Mirror.
http://maven.aliyun.com/nexus/content/groups/public/
repo2
central
Human Readable Name for this Mirror.
http://repo2.maven.org/maven2/
ui
central
Human Readable Name for this Mirror.
http://uk.maven.org/maven2/
jboss-public-repository-group
central
JBoss Public Repository Group
http://repository.jboss.org/nexus/content/groups/public
repo1
central
Human Readable Name for this Mirror.
http://repo1.maven.org/maven2/
如果$HOME/.m2下没有settings.xml文件,可以去 http://maven.apache.org/download.cgi 下载个发布包,然后复制一个出来
设置完maven配置之后,可以用如下命令编译打包 ::
# 编译
mvn -s [settings.xml路径] compile
# 打包
mvn -s [settings.xml路径] package
加速NPM包下载
------------------------------
关闭npm的https
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
npm config set strict-ssl false
设置npm的软件源
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
npm config set registry "http://registry.npmjs.org/"
npm config set registry https://mirrors.tencent.com/npm/
npm config set registry https://registry.npm.taobao.org/
npm install -g cnpm --registry=https://registry.npm.taobao.org
代理
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 设置代理: ``npm config set proxy=http://代理服务器ip:代理服务器端口``
+ 取消代理: ``npm config delete http-proxy``
+ 取消代理: ``npm config delete https-proxy``
+ 单独设置代理: ``npm install --save-dev electron-prebuilt --proxy http://代理服务器ip:代理服务器端口``