|
|
|
@ -14,12 +14,15 @@ Licensed under:
|
|
|
|
|
const postcss = require("postcss");
|
|
|
|
|
const icssUtils = require("icss-utils");
|
|
|
|
|
const loaderUtils = require("loader-utils");
|
|
|
|
|
const { validateOptions, required, isFunction, isBoolean } = require("validatem");
|
|
|
|
|
const { validateOptions } = require("@validatem/core");
|
|
|
|
|
const required = require("@validatem/required");
|
|
|
|
|
const isBoolean = require("@validatem/is-boolean");
|
|
|
|
|
const isFunction = require("@validatem/is-function");
|
|
|
|
|
|
|
|
|
|
const pluginName = 'postcss-icss-parser';
|
|
|
|
|
|
|
|
|
|
module.exports = postcss.plugin(pluginName, (options = {}) => {
|
|
|
|
|
validateOptions([options], {
|
|
|
|
|
module.exports = postcss.plugin(pluginName, function(options = {}) {
|
|
|
|
|
validateOptions(arguments, {
|
|
|
|
|
keyReplacer: [ required, isFunction ],
|
|
|
|
|
autoExportImports: [ isBoolean ]
|
|
|
|
|
});
|
|
|
|
|