lepu-test-platform-web/node_modules/csso/lib/compressor/clean/index.js

18 lines
534 B
JavaScript
Raw Permalink Normal View History

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);
}
});
};