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

学校网站建设的意义百度一下下载

学校网站建设的意义,百度一下下载,现在怎么做网站,用ps设计网页页面一、创建一个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.dtcms.com/wzjs/59082.html

相关文章:

  • wordpress更换域名的几个步骤google关键词优化
  • 英文 网站 源码如何做好seo基础优化
  • 做贵网站多少钱网络推广计划书范文
  • 关于淘宝店网站建设的可行性报告seo自学网官网
  • 建设网站有什么风险seo是什么职务
  • 怎么做网站推销产品成都黑帽seo
  • 珠宝品牌网站设计广告免费发布信息
  • 加上政府网站建设百度店面定位怎么申请
  • 四川网站建设和优化seo优化销售话术
  • wordpress媒体库域名嘉兴优化公司
  • 方案网站有哪些北京网站定制公司
  • 深圳建设工程项目网站中国十大软件外包公司
  • web做网站怎么添加图片百度站长工具网站提交
  • 网站内容与目录结构图合肥今日头条新闻
  • wordpress 邮箱变更seo模拟点击算法
  • 如何给企业做网站推广免费seo推广公司
  • 帮别人做非法网站自首企业官网网站
  • 手机制作3d动画seo咨询价格找推推蛙
  • 网站关键字标签专业做加盟推广的公司
  • 建设部网站查询注册岩土工程师百度热搜榜历史
  • 做网站的目标是什么互联网广告推广是什么
  • 哪个网站可以做字体刷赞网站推广免费链接
  • 番禺网站制作价格今日桂林头条新闻
  • 陕西西安网站建设公司北京网站优化经理
  • 兴义之窗网站怎么做深圳网络推广推荐
  • 日本做a的短视频网站刷关键词的平台
  • 如何用模板搭建网站外包网络推广公司
  • 设计师助理做网站吗永久免费自动建站
  • 网站备案 他人身份证seo推广思路
  • 成都住房和城乡建设部网站查询百度搜索风云榜小说