lix-website/themes/lix/assets/bootstrap/node_modules/postcss-less/lib/index.js

31 lines
595 B
JavaScript
Raw Normal View History

2024-04-27 03:39:10 +00:00
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;
}
};