Skip to content

Commit

Permalink
decouple api-extractor-model from node api
Browse files Browse the repository at this point in the history
But it can't run in browser now, because circular reference for ApiDeclaredItem
  • Loading branch information
csr632 committed Apr 26, 2020
1 parent 8fca14e commit 7c25c36
Show file tree
Hide file tree
Showing 22 changed files with 2,404 additions and 50 deletions.
11 changes: 11 additions & 0 deletions fixtures/simple/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script src="dist/index.js"></script>
</body>
</html>
18 changes: 14 additions & 4 deletions fixtures/simple/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,24 @@ export default {
input: "src/index.ts",
output: {
dir: "dist",
format: "esm",
format: "iife",
},
plugins: [typescript(), resolve(), commonjs()],
external: ["@microsoft/tsdoc", "@rushstack/node-core-library"],
plugins: [
typescript(),
resolve(),
commonjs({
namedExports: {
timsort: ["sort"],
},
}),
],
onwarn(warning, rollupWarn) {
if (
warning.code === "CIRCULAR_DEPENDENCY" &&
warning.cycle.some((c) => /model\/Deserializer/.test(c))
(false ||
// warning.cycle.some((c) => /items\/ApiItem/.test(c)) ||
warning.cycle.some((c) => /@microsoft\/tsdoc/.test(c)) ||
false)
) {
return;
}
Expand Down
Loading

0 comments on commit 7c25c36

Please sign in to comment.