lix-website/themes/lix/assets/bootstrap/node_modules/postcss-less/lib/index.js
2024-04-26 22:49:34 -06:00

31 lines
595 B
JavaScript

const Input = require('postcss/lib/input');
const LessParser = require('./LessParser');
const LessStringifier = require('./LessStringifier');
module.exports = {
parse(less, options) {
const input = new Input(less, options);
const parser = new LessParser(input);
parser.parse();
return parser.root;
},
stringify(node, builder) {
const stringifier = new LessStringifier(builder);
stringifier.stringify(node);
},
nodeToString(node) {
let result = '';
module.exports.stringify(node, (bit) => {
result += bit;
});
return result;
}
};