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