webpack
Version:
Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
29 lines (25 loc) • 954 B
JavaScript
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author sheo13666q @sheo13666q
*/
;
/** @typedef {typeof import("./syntax-parser")} SyntaxParser */
/** @typedef {typeof import("./syntax-printer")} SyntaxPrinter */
// JavaScript's two halves, as `css` and `html` name theirs: the parser a build
// reads source with, and the printer it writes minified source back out with.
// Reached through getters, so parsing never loads the printer — nor the
// minifier behind it — and the printer loads the parser for its `parse` phase only.
module.exports = {
/** @returns {SyntaxParser} the parser */
get parser() {
return require("./syntax-parser");
},
/** @returns {SyntaxPrinter} the printer */
get printer() {
return require("./syntax-printer");
},
/** @returns {SyntaxParser["toEstreeObject"]} builds a node's ESTree object */
get toEstreeObject() {
return require("./syntax-parser").toEstreeObject;
}
};