tailwind
This commit is contained in:
parent
1405549e08
commit
c67bf28236
6 changed files with 2934 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -10,3 +10,5 @@ disablesignups
|
|||
venv/
|
||||
.vscode/
|
||||
disablesignups
|
||||
.sass-cache/
|
||||
node_modules/
|
|
@ -3,6 +3,7 @@ gevent.monkey.patch_all()
|
|||
from os import environ
|
||||
import secrets
|
||||
from flask import *
|
||||
from flask_assets import Bundle, Environment
|
||||
from flask_caching import Cache
|
||||
from flask_limiter import Limiter
|
||||
from flask_compress import Compress
|
||||
|
@ -88,6 +89,13 @@ cache = Cache(app)
|
|||
Compress(app)
|
||||
mail = Mail(app)
|
||||
|
||||
assets = Environment(app)
|
||||
css = Bundle('src/main.css', output='dist/main.css', filters='postcss')
|
||||
|
||||
assets.register('css', css)
|
||||
css.build()
|
||||
|
||||
|
||||
@app.before_request
|
||||
def before_request():
|
||||
|
||||
|
|
11
files/static/tailwind.config.js
Normal file
11
files/static/tailwind.config.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
module.exports = {
|
||||
purge: [],
|
||||
darkMode: false, // or 'media' or 'class'
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
variants: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
}
|
2889
package-lock.json
generated
Normal file
2889
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
9
package.json
Normal file
9
package.json
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"@fullhuman/postcss-purgecss": "^4.0.3",
|
||||
"autoprefixer": "^10.4.0",
|
||||
"postcss": "^8.4.1",
|
||||
"postcss-cli": "^9.0.2",
|
||||
"tailwindcss": "^2.2.19"
|
||||
}
|
||||
}
|
14
postcss.config.js
Normal file
14
postcss.config.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
const path = require('path');
|
||||
|
||||
module.exports = (ctx) => ({
|
||||
plugins: [
|
||||
require('tailwindcss')(path.resolve(__dirname, 'tailwind.config.js')),
|
||||
require('autoprefixer'),
|
||||
require('@fullhuman/postcss-purgecss')({
|
||||
content: [
|
||||
path.resolve(__dirname, 'templates/**/*.html')
|
||||
],
|
||||
defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || []
|
||||
})
|
||||
],
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue