# 初始化
首先创建一个文件夹 nuxt-practice
, 并进入到该目录下
npm 6.1 之下的版本,使用如下方式
npm init nuxt-app ./
npm 6.1 之上的版本可以使用:
npx create-nuxt-app ./
或者使用 yarn
yarn create nuxt-app ./
执行之后命令行会显示一些可选配置(根据项目自行选择),这里我们选择的配置如下:
Project name: nuxt-practice
Programming language: JavaScript
Package manager: Npm
UI framework: None
Linting tools: ESLint, Prettier, Lint staged files, StyleLint
Testing framework: None
Rendering mode: Universal (SSR / SSG)
Deployment target: Server (Node.js hosting)
Development tools: jsconfig.json (Recommended for VS Code)
等待安装完成之后,使用 npm run dev
运行,访问 http://localhost:3000/ (opens new window), 至此项目创建完成。
TIP
如果出现如下提示,请选择no
NuxtJS collects completely anonymous data about usage.
This will help us improving Nuxt developer experience over the time.
Read more on https://git.io/nuxt-telemetry
Are you interested in participation? No
定制化 →