安装Yarn
Yarn 是为了弥补 npm 的一些缺陷而生的
具体参考:https://zhuanlan.zhihu.com/p/27449990
引导式安装
使用Windows版的下载安装即可

bash安装
在bash里面不能显示,在bash里面下载
npm install -g yarn 即可
将 VuePress 安装为本地依赖
yarn init
yarn init 出错
error An unexpected error occurred: "Can't answer a question unless a user TTY". info If you think t
使用cmd或者power shell不要使用bash
yarn add -D vuepress

创建一篇文章
在bash创建,在powershell里面创建会报错
mkdir docs && echo '# Hello VuePress' > docs/README.md

添加脚本
{
"name": "my-site",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"devDependencies": {
"vuepress": "^1.7.1"
},
"scripts": {
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs"
}
}
运行

评论区