Opal-Estate-Pro/node_modules/csso/lib/compressor/clean/index.js
2019-09-13 11:27:52 +07:00

18 lines
534 B
JavaScript
Executable File

var walk = require('../../utils/walk.js').all;
var handlers = {
Space: require('./Space.js'),
Atrule: require('./Atrule.js'),
Ruleset: require('./Ruleset.js'),
Declaration: require('./Declaration.js'),
Identifier: require('./Identifier.js'),
Comment: require('./Comment.js')
};
module.exports = function(ast, usageData) {
walk(ast, function(node, item, list) {
if (handlers.hasOwnProperty(node.type)) {
handlers[node.type].call(this, node, item, list, usageData);
}
});
};