小技巧

创建公私钥对

$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
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,991评论 19 139
  • Configuration:配置 列举所有的别名与配置 git config--list Git 别名配置 git...
    Android_lml阅读 1,070评论 0 1
  • 总结: git fetch下载的repo要比git clone下载的repo大许多。 给定一个tag标签,git ...
    seeek阅读 330评论 1 0
  • BASH 运行选项 -x 输出sh运行时的详细步骤 重新设置终端大小 一般情况下终端大小是2480,或者4214...
    羽风之歌阅读 853评论 1 1
  • 清早的屋外,大雨淋漓,雨水沿着瓦片滴落到地上“哒哒”作响,水雾弥漫,宁静的小山村一片朦胧。 屋内,一道身影坐在凳子...
    龙门故事客栈阅读 547评论 0 1