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

27 lines
495 B
JavaScript
Raw Normal View History

2024-04-27 03:39:10 +00:00
"use strict";
const stringify = require("./stringify");
const parse = require("./parse");
const defaultConfig = {
postcss: "css",
stylus: "css",
babel: "jsx",
xml: "html",
};
function initSyntax (syntax) {
syntax.stringify = stringify.bind(syntax);
syntax.parse = parse.bind(syntax);
return syntax;
}
function syntax (config) {
return initSyntax({
config: Object.assign({}, defaultConfig, config),
});
}
initSyntax(syntax);
syntax.config = defaultConfig;
module.exports = syntax;