Skip to content

Commit

Permalink
fix(website-generator): copy textchecker-element.esm.js to outputDir (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
azu authored Jul 17, 2023
1 parent 164fb82 commit 89055a5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/@textlint/website-generator/src/website-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ export const generateWebSite = async (options: generateWebSiteOptions) => {
cwd: options.cwd,
metadata: options.metadata
});
// rename textlint.js to <id>.textlint.js;
fs.renameSync(
path.join(options.outputDir, "textlint-worker.js"),
path.join(options.outputDir, "textlint-worker.js")
// copy template/textchecker-element.esm.js
fs.copyFileSync(
path.join(templateDir, "textchecker-element.esm.js"),
path.join(options.outputDir, "textchecker-element.esm.js")
);

// index.{js,html}
const indexHtml = fs.readFileSync(path.join(templateDir, "index.html"), "utf-8");
const filledHTML = indexHtml.replace("{{title}}", options.title).replace("{{placeholder}}", options.placeholder);
Expand Down

0 comments on commit 89055a5

Please sign in to comment.