mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-03 19:19:30 +08:00
23 lines
474 B
Text
23 lines
474 B
Text
'use strict';
|
|
const processors = require('./lib/decl');
|
|
/**
|
|
* @type {import('postcss').PluginCreator<void>}
|
|
* @return {import('postcss').Plugin}
|
|
*/
|
|
function pluginCreator() {
|
|
return {
|
|
postcssPlugin: 'postcss-merge-longhand',
|
|
|
|
OnceExit(css) {
|
|
css.walkRules((rule) => {
|
|
processors.forEach((p) => {
|
|
p.explode(rule);
|
|
p.merge(rule);
|
|
});
|
|
});
|
|
},
|
|
};
|
|
}
|
|
|
|
pluginCreator.postcss = true;
|
|
module.exports = pluginCreator;
|