小技巧

作者: clark124 | 来源:发表于2017-05-20 12:39 被阅读0次

创建公私钥对

$ssh-keygen -t rsa -b 4096 -C "53799906@qq.com"
cat .ssh/id_rsa.pub

github 一些小设置

  1. 运行 npm config set loglevel http,让你知道 npm 发的每一个请求
  2. 运行 npm config set progress false,关闭那个无聊的进度条
  3. 运行 npm config set registry https://registry.npm.taobao.org/ , 从淘宝的服务器下载各种包。不过这会让你在运行 npm adduser 的时候出问题,想要恢复成原样,只需要运行 npm config delete registry 即可。
  4. 运行 touch ~/.bashrc; echo 'export PHANTOMJS_CDNURL="http://npm.taobao.org/mirrors/phantomjs"' >> ~/.bashrc 让 npm 从淘宝下载 phantomjs
    5 。运行 touch ~/.bashrc; echo 'export SASS_BINARY_SITE="https://npm.taobao.org/mirrors/node-sass"' >> ~/.bashrc 让 npm 从淘宝下载 SASS
    6 运行 source ~/.bashrc

创建github仓库

确保你在项目根目录

git init
git config user.name 你的名字
git config user.email 你的邮箱
echo '/node_modules/' > .gitignore
git add .
git commit -m '完成 webpack 的第一个例子'

然后去 GitHub 上新建一个 repo,(你在新建 repo 的时候,除了 repo name,其他的什么都不要写!!!)

git remote add origin git@github.com:Clark124/bootstrap1.git
git push -u origin master

vscode配置vue 用tab快速生成标签

"emmet.syntaxProfiles": {
  "vue-html": "html",
  "vue": "html"
}

vue-cli

全局安装 vue-cli(安装在当前目录也可以),并用 vue-cli 来初始化一个 vue 项目

> npm install -g vue-cli
> vue init webpack .   # 注意这里的 . 字符

? Generate project in current directory? Yes
  This will install Vue 2.x version of the template.

  For Vue 1.x use: vue init webpack#1.0

? Project name resumer
? Project description A Vue.js project
? Author frankfang <frankfang1990@gmail.com>
? Vue build standalone
? Install vue-router? Yes
? Use ESLint to lint your code? Yes
? Pick an ESLint preset Standard
? Setup unit tests with Karma + Mocha? Yes
? Setup e2e tests with Nightwatch? No

   vue-cli · Generated "resumer".


> npm i
> npm run dev

相关文章

网友评论

    本文标题:小技巧

    本文链接:https://www.haomeiwen.com/subject/wbbsxxtx.html