当前位置: 首页 > news >正文

佛山新网站制作公司手机能建设网站忙

佛山新网站制作公司,手机能建设网站忙,wordpress 坏图片,wordpress用户冻结一、创建一个next项目 使用create-next-app来启动一个新的Next.js应用,它会自动为你设置好一切 运行命令: npx create-next-applatest 执行结果如下: 启动项目: pnpm dev 执行结果: 启动成功! 二、安装Mater…

一、创建一个next项目

使用create-next-app来启动一个新的Next.js应用,它会自动为你设置好一切

运行命令:

npx create-next-app@latest

执行结果如下: 

 启动项目:

pnpm dev

执行结果: 

启动成功! 

二、安装Material UI依赖

根据Material UI官网介绍,截至2021年底,样式组件与服务器渲染的材质UI项目不兼容。这是因为babel-plugin风格的组件不能与@mui包中的styled()实用程序一起工作。有关详细信息,请参阅此GitHub问题。我们强烈建议在SSR项目中使用Emotion。

运行命令:

pnpm add @mui/material @emotion/styled @emotion/react @emotion/cache @mui/icons-material

 三、使用prettier美化项目代码

安装prettier相关依赖,及其文件配置

运行命令:

pnpm add prettier eslint-config-prettier eslint-plugin-prettier eslint-plugin-react-hooks -D

prettier文件配置.prettierrc.json

{"semi": true,"endOfLine": "auto","singleQuote": true,"trailingComma": "none","bracketSpacing": true,"jsxBracketSameLine": false,"vueIndentScriptAndStyle": false,"jsxBracketSameLine:": true,"htmlWhitespaceSensitivity": "ignore","wrapAttributes": true,"overrides": [{"files": "*.html","options": {"parser": "html"}}]
}

安装eslint相关依赖:

运行命令:

pnpm  add @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-import-resolver-typescript -D

eslint文件.eslintrc.json配置:

{"root": true,"extends": ["eslint:recommended", "next","prettier"],"env": {"es6": true,"node": true,"browser": true},"parserOptions": {"ecmaVersion": 12,"parser": "@typescript-eslint/parser"},"plugins": ["prettier", "react-hooks","@typescript-eslint"],"parser": "@typescript-eslint/parser","globals": {"chrome": true,"React":true},"settings": {"import/resolver": {"node": {"extensions": [".js", ".jsx", ".ts", ".tsx"]}}},"rules": {"prettier/prettier":"error"}
}

四、使用Prettier自动排序tailwind CSS类

为了使用Prettier自动排序tailwind CSS类,我们需要安装Prettier -plugin-tailwindcss。
运行如下命令安装插件:

pnpm add -D prettier-plugin-tailwindcss

prettier文件配置.prettierrc.json:

{"semi": true,"endOfLine": "auto","singleQuote": true,"trailingComma": "none","bracketSpacing": true,"jsxBracketSameLine": false,"vueIndentScriptAndStyle": false,"jsxBracketSameLine:": true,"htmlWhitespaceSensitivity": "ignore","wrapAttributes": true,"plugins": ["prettier-plugin-tailwindcss"],"overrides": [{"files": "*.html","options": {"parser": "html"}}]
}

五、安装sass

虽然项目当中已经安装了tailwind css进行样式处理,但是有时候不可避免的需要写点样式.因此,安装sass进行,样式的编写:

pnpm add sass -D

至此,一个使用Material UI组件,使用eslint、Prettier进行规范、美化代码的next项目就搭建完毕了。开始你的炫酷旅程吧!

http://www.yayakq.cn/news/910867/

相关文章:

  • 在电脑上做网站的软件如何黑掉jsp做的网站
  • 浙江省住房建设厅继续教育网站度假村网站模板
  • 合肥网站建设政务区长沙财优化公司
  • 深圳电力建设公司网站济南专业网站制作
  • 网站服务器是指什么网站开发是哪个
  • 长沙模板建站源码三大主流app开发平台
  • 赣州市南康建设局网站深圳营销策划
  • 建立网站的步骤和费用火车头获取不到wordpress列表
  • 网站项目策划书模板建广告网站需要多少钱
  • 怎么做刷业网站医疗器械网
  • 手机测评网站seo免费视频教程
  • 网站制作公司制作网站的流程是怎样的呢网站建设专业品牌
  • 免费的asp网站wordpress08
  • 网站空间数据库如何在google上免费推广
  • 秦皇岛开发区建设局网站怎样利用网站做推广
  • 电子商务网站建设精品课程网站建设拓扑图
  • 北京建设银行支行查询官方网站公交建设公司的官网
  • 手机网站链接微信响应式模板网站
  • 上海网站建设公司推荐排名网站皮肤样板
  • 太原网站建设技术托管ftp上传wordpress程序要多长时间
  • 西安做网站排名搭建网站平台如何做分录
  • 建设资格注册管理中心网站活动策划公司网站
  • c 做交易网站网站源码大全
  • 做网站设计软件网页设计1920尺寸
  • 门户网站建设重建方案小型企业网站开发现状
  • 湖南网页设计培训网站建设上海人才网官网招聘招聘
  • 静态网站制作wordpress模版wordpress+团购
  • 毕设如何做网站百度搜索不到自己的网站
  • 个人博客网站搭建模板美丽说网站建立的主要方式
  • wordpress回收站在哪h5和网站的区别