Nuxtjs 学习笔记 --- 01 安装

Nuxtjs 学习笔记 — 01 安装

1、使用 yarn creat next-app 构建项目

遇到报错 syntax error near unexpected token `newline' 
将 <project-name> 改为 project-name 即可。'<'和'>'是特殊字符,命令端输入命令时应该把'<>'去掉

2、选择配置项

// 项目名称
Project name:	

// 选择编程语言
Programming language:	
	>JavaScript 
 	 TypeScript 
 		
// 包管理工具
Package manager:	
 	>Yarn 
  	 Npm 

// UI 库
UI framework:	
 	>None 
     Ant Design Vue 
     Bootstrap Vue 
     Buefy 
     Bulma 
     Chakra UI 
     Element 
     Framevuerk 
     iView 
     Tachyons 
     Tailwind CSS 
     Vuesax 
     Vuetify.js 
    
// http 请求
Nuxt.js modules:	
	>◯ Axios
	 ◯ Progressive Web App (PWA)
 	 ◯ Content

// ESLint 配置
Linting tools:	
	>◯ ESLint
  	 ◯ Prettier
  	 ◯ Lint staged files
  	 ◯ StyleLint
  	 ◯ Commitlint
  	
// 测试框架
Testing framework:	
	❯None 
     Jest 
     AVA 
     WebdriverIO 
    
// 渲染模式
Rendering mode:	
	❯Universal (SSR / SSG) 
  	 Single Page App 
  	
// 服务端渲染
Deployment target:	
  ❯ Server (Node.js hosting) 
    Static (Static/JAMStack hosting) 
    
// 开发工具
Development tools:	
	❯◯ jsconfig.json (Recommended for VS Code if you're not using typescript)
     ◯ Semantic Pull Requests
     ◯ Dependabot (For auto-updating dependencies, GitHub only)
    
// 自动化部署
Continuous integration:	
	❯None 
  	 GitHub Actions (GitHub only) 
  	
// 版本管理工具
Version control system:	
	❯ Git 
	  None 

3、下载依赖

cd 项目名
yarn || npm install	|| cnpm install  // 三选一

4、启动

yarn dev || npm run dev || cnpm run dev // 三选一 

​ 应用一般运行在 http://localhost:3000

//	可以在 package.json 配置 ip 与 端口
"config": {
  "nuxt":{
    "host":"", 	// 	ip 
    "port":""	//	端口
  }
}
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值