Skip to content

Commit

Permalink
feat: add tailwindcss
Browse files Browse the repository at this point in the history
  • Loading branch information
ckvv committed Dec 16, 2021
1 parent c54f1a8 commit 8a70a96
Show file tree
Hide file tree
Showing 7 changed files with 261 additions and 21 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
+ `eslint`: 检查语法规则和代码风格
+ `commitlint` & `husky`: 检查commit提交的信息
+ `rollup-plugin-visualizer`: 生成 report.html 以帮助分析包内容
+ `tailwindcss`: 以配置好tailwindcss的方式,自动生成样式文件

# Getting Started

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"husky": "^7.0.4",
"lint-staged": "^12.1.2",
"sass": "^1.44.0",
"standard-version": "^9.3.2"
"standard-version": "^9.3.2",
"tailwindcss": "^3.0.5"
},
"lint-staged": {
"*.{js,jsx,vue}": [
Expand Down
5 changes: 5 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
plugins: {
tailwindcss: {},
},
};
7 changes: 6 additions & 1 deletion src/assets/style/index.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
@import "./variable.scss";
@import "./mixin.scss";

@tailwind base;
@tailwind components;
@tailwind utilities;


* {
box-sizing: border-box;
:focus{
outline: none;
@apply outline-none;
}
}
.icon {
Expand Down
2 changes: 1 addition & 1 deletion src/views/Sign.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="sign">
<div class="sign-content">
<div class="sign-title">
<div class="sign-title text-gray-800">
vite-element-template
</div>
<el-form :hide-required-asterisk="true" label-position="left" class="sign-form" ref="form" :model="user" label-width="70px">
Expand Down
10 changes: 10 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
content: [
'./index.html',
'./src/**/*.{vue,js,ts,jsx,tsx}',
],
theme: {
extend: {},
},
plugins: [],
};
Loading

0 comments on commit 8a70a96

Please sign in to comment.