Son CV dans un terminal web en Javascript!
https://terminal-cv.gregandev.fr
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
740 B
24 lines
740 B
var walk = require('css-tree').walk;
|
|
var handlers = {
|
|
Atrule: require('./Atrule'),
|
|
AttributeSelector: require('./AttributeSelector'),
|
|
Value: require('./Value'),
|
|
Dimension: require('./Dimension'),
|
|
Percentage: require('./Percentage'),
|
|
Number: require('./Number'),
|
|
String: require('./String'),
|
|
Url: require('./Url'),
|
|
Hash: require('./color').compressHex,
|
|
Identifier: require('./color').compressIdent,
|
|
Function: require('./color').compressFunction
|
|
};
|
|
|
|
module.exports = function(ast) {
|
|
walk(ast, {
|
|
leave: function(node, item, list) {
|
|
if (handlers.hasOwnProperty(node.type)) {
|
|
handlers[node.type].call(this, node, item, list);
|
|
}
|
|
}
|
|
});
|
|
};
|
|
|