* Move files around in preparation for refactor * Update paths in build script * Extract generic printing logic from the JavaScript printer * Conform printer API * Fixup decorator handling * Fix multiparser * Create plugin entry for markdown * Create plugin entry for javascript/typescript * Create plugin entry for html * Create plugin entry for graphql * Create plugin entry for css/less/scss * Move JSON to JS plugin entry * Integrate plugins into getSupportInfo() * Move astFormat to parser definition * Move util to common * Implement parser loading * remark -> mdast * Rename cli/cli -> cli/index * Rename builder -> doc package, fix printer resolution * Fix doc shape assumption in CSS-in-JS logic * Fix third-party.js prod resolution * Fixup build-docs script * Distribute multiparser code * Remove requirement to forward options * Flatten closure * Remove debug directory * Expose doc * Add external plugins * Pass options to loadPlugins * Export getParsers * Pin resolve version * Use getSupportInfo in Markdown embed * Document plugin API * Update build-docs * Add CLI for plugins * Lint docs * Fixup build.js * Add vue language * Fixup multiparser for vue * Upgrade rollup and rollup-plugin-commonjs * Fixup third-party build * Change AST format in docs
27 lines
977 B
JavaScript
27 lines
977 B
JavaScript
import baseConfig from "./rollup.base.config.js";
|
|
import resolve from "rollup-plugin-node-resolve";
|
|
import commonjs from "rollup-plugin-commonjs";
|
|
import json from "rollup-plugin-json";
|
|
import replace from "rollup-plugin-replace";
|
|
|
|
export default Object.assign(baseConfig, {
|
|
entry: "src/common/third-party.js",
|
|
dest: "dist/third-party.js",
|
|
format: "cjs",
|
|
plugins: [
|
|
replace({
|
|
// The require-from-string module (a dependency of cosmiconfig) assumes
|
|
// that `module.parent` exists, but it only does for `require`:ed modules.
|
|
// Usually, require-from-string is _always_ `require`:ed, but when bundled
|
|
// with rollup the module is turned into a plain function located directly
|
|
// in index.js so `module.parent` does not exist. Defaulting to `module`
|
|
// instead seems to work.
|
|
"module.parent": "(module.parent || module)"
|
|
}),
|
|
json(),
|
|
resolve({ preferBuiltins: true }),
|
|
commonjs()
|
|
],
|
|
external: ["assert"]
|
|
});
|