1. init
npm init -ynpm install tailwindCSS postCSS-cli autoprefixernpx tailwind init
2. postCSS.config.Js
const purgeCSS = require(‘@fullhuman/postcss-purgeCSS‘)({ content: [ ‘./src/**/*.HTML‘,‘./src/**/*.vue‘,],defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || []})module.exports = { plugins: [ require(‘tailwindCSS‘),require(‘autoprefixer‘),...process.env.NODE_ENV === ‘production‘ ? [purgeCSS] : [] ]}
3. src/CSS/tailwind.CSS
@tailwind base;@tailwind components;@tailwind utilitIEs;
4. package.Json
"scripts": { "dev": "postCSS src/CSS/tailwind.CSS -o public/CSS/all.CSS" },
5. public/index.HTML
<Title>index</Title>
<link rel="stylesheet" href="./CSS/all.CSS"><body> <h1 >Hello World!</h1> 总结
以上是内存溢出为你收集整理的tailwiind init全部内容,希望文章能够帮你解决tailwiind init所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)