Skip to content

Commit b63d3a2

Browse files
committed
🐛 jsDocを修正
1 parent c0faa54 commit b63d3a2

21 files changed

+1177
-974
lines changed

api-extractor.json

Lines changed: 0 additions & 422 deletions
This file was deleted.

dev/build.js

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ const exorcist = require("exorcist");
33
const rollup = require("rollup");
44
const dts = require("rollup-plugin-dts").default;
55
const commonjs = require("@rollup/plugin-commonjs");
6-
const { Extractor, ExtractorConfig } = require("@microsoft/api-extractor");
76
const fs = require("node:fs");
87
const path = require("node:path");
98
const { minify } = require("terser");
@@ -124,22 +123,6 @@ async function buildRollup() {
124123
});
125124
}
126125

127-
function runApiExtractor() {
128-
const extractorConfigPath = path.resolve(baseDir, "api-extractor.json");
129-
const extractorConfig = ExtractorConfig.loadFileAndPrepare(extractorConfigPath);
130-
131-
const { succeeded, errors, warnings } = Extractor.invoke(extractorConfig, {
132-
localBuild: true,
133-
showVerboseMessages: true,
134-
});
135-
136-
if (succeeded) {
137-
console.log("✨ API Extractor completed successfully!");
138-
} else {
139-
throw new Error("💥API Extractor failed.");
140-
}
141-
}
142-
143126
function fixDtsOutputFlexible(filePath, log = false) {
144127
let code = fs.readFileSync(filePath, "utf8");
145128

@@ -159,6 +142,13 @@ function fixDtsOutputFlexible(filePath, log = false) {
159142
return `${b}${d}`;
160143
},
161144
],
145+
[
146+
`([A-Za-z][A-Za-z0-9]*)_forceRep`,
147+
(a, b) => {
148+
if (log) console.log(`┃┃ ${b} : ${CL.cyan("強制変更")}`);
149+
return b;
150+
},
151+
],
162152
];
163153

164154
for (const [reg, rep] of regList) {
@@ -206,14 +196,13 @@ function fixDtsOutputFlexible(filePath, log = false) {
206196
console.log(`┃⛳ ${CL.brightWhite("rollup用entrypoint作成")}`);
207197
createEntryEndpoint(entryTypesPath);
208198
console.log("┃📦 .d.ts を rollup中...");
209-
//await buildRollup();
210-
runApiExtractor();
199+
await buildRollup();
211200
console.log(`┃┗✅ ${CL.brightWhite("rollup完了")}: ${getRelativePath(typesPath)}`);
212201
console.log(`┃🗑️ ${CL.brightWhite("types仮フォルダcleanup")}`);
213-
//prepareDir(typesTmpDir);
214-
console.log(`┃🌵 ${CL.brightWhite("予測候補問題を解決")}`);
202+
prepareDir(typesTmpDir);
203+
console.log(`┃🌵 ${CL.brightWhite("予測候補・コンパイル問題を解決")}`);
215204
fixDtsOutputFlexible(typesPath, logView);
216-
console.log(`┃┗✅ ${CL.brightWhite("予測候補問題 修正完了")}: ${getRelativePath(typesPath)}`);
205+
console.log(`┃┗✅ ${CL.brightWhite("予測候補・コンパイル問題 修正完了")}: ${getRelativePath(typesPath)}`);
217206
showFileSize(typesPath);
218207
}
219208

dev/build/createEntryEndpoint.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ const path = require("node:path");
33

44
function generateEndpoint(entryPath) {
55
const inData = `import * as JavaLibraryScript from "./index.js";
6-
export default JavaLibraryScript;
7-
`;
6+
export default JavaLibraryScript;`;
87
fs.writeFileSync(entryPath, inData, "utf8");
98
}
109

dist/JavaLibraryScript.js

Lines changed: 23 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/JavaLibraryScript.js.map

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/JavaLibraryScript.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/JavaLibraryScript.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

etc/javalibraryscript.api.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)