mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Fix tailwind setup
- Adopted postcss and tailwind config to new version - renamed colors bluegray->slate etc to not have custom definitions (hope to reduce migration next time) - tailwind now doesn't build the complete css anymore, so the `dev-ui-build` script must compile both
This commit is contained in:
@ -1,31 +1,21 @@
|
||||
//postcss.config.js
|
||||
const tailwindcss = require("tailwindcss");
|
||||
|
||||
const devPlugins =
|
||||
const basePlugins =
|
||||
[
|
||||
require('postcss-import'),
|
||||
tailwindcss("./tailwind.config.js"),
|
||||
require("autoprefixer")
|
||||
require('tailwindcss'),
|
||||
require('autoprefixer'),
|
||||
];
|
||||
|
||||
const prodPlugins =
|
||||
[
|
||||
require('postcss-import'),
|
||||
tailwindcss("./tailwind.config.js"),
|
||||
require("autoprefixer"),
|
||||
require("postcss-purgecss")({
|
||||
content: [
|
||||
"./src/main/elm/**/*.elm",
|
||||
"./src/main/styles/keep.txt",
|
||||
"../restserver/src/main/templates/*.html"
|
||||
],
|
||||
defaultExtractor: content => content.match(/[A-Za-z0-9-_:/\.]+/g) || []
|
||||
}),
|
||||
require('cssnano')({
|
||||
preset: 'default'
|
||||
})
|
||||
]
|
||||
require('tailwindcss'),
|
||||
require('autoprefixer'),
|
||||
require('cssnano'),
|
||||
];
|
||||
|
||||
|
||||
module.exports = (ctx) => ({
|
||||
plugins: ctx.env === 'production' ? prodPlugins : devPlugins
|
||||
});
|
||||
plugins: ctx && ctx.env === 'production' ? prodPlugins : basePlugins
|
||||
})
|
||||
|
Reference in New Issue
Block a user