1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-22 16:02:43 +00:00
Radarr/frontend/postcss.config.js
Qstick 58934a30ce Update postcss packages
(cherry picked from commit 408089957ab8a9dc6a21b485853b9d86a9ace59f)
2021-05-09 08:15:10 -04:00

32 lines
No EOL
800 B
JavaScript

const reload = require('require-nocache')(module);
const cssVarsFiles = [
'./src/Styles/Variables/colors',
'./src/Styles/Variables/dimensions',
'./src/Styles/Variables/fonts',
'./src/Styles/Variables/animations',
'./src/Styles/Variables/zIndexes'
].map(require.resolve);
const mixinsFiles = [
'frontend/src/Styles/Mixins/cover.css',
'frontend/src/Styles/Mixins/linkOverlay.css',
'frontend/src/Styles/Mixins/scroller.css',
'frontend/src/Styles/Mixins/truncate.css'
];
module.exports = {
plugins: [
['postcss-mixins', {
mixinsFiles
}],
['postcss-simple-vars', {
variables: () =>
cssVarsFiles.reduce((acc, vars) => {
return Object.assign(acc, reload(vars));
}, {})
}],
'postcss-color-function',
'postcss-nested'
]
};