2018-11-23 08:04:42 +01:00
|
|
|
const reload = require('require-nocache')(module);
|
|
|
|
|
2021-04-26 00:01:08 +02:00
|
|
|
const cssVarsFiles = [
|
|
|
|
'./src/Styles/Variables/dimensions',
|
|
|
|
'./src/Styles/Variables/fonts',
|
|
|
|
'./src/Styles/Variables/animations',
|
|
|
|
'./src/Styles/Variables/zIndexes'
|
|
|
|
].map(require.resolve);
|
2018-11-23 08:04:42 +01:00
|
|
|
|
2021-04-26 00:01:08 +02:00
|
|
|
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'
|
|
|
|
]
|
2022-09-10 23:29:38 +02:00
|
|
|
};
|