Skip to content

Commit

Permalink
move
Browse files Browse the repository at this point in the history
  • Loading branch information
qdraw committed Nov 8, 2023
1 parent 7eab981 commit 34c8d90
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 8 additions & 0 deletions documentation/scripts/postbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ fs.writeFileSync(versionTextPath, hash)
// robots txt generator
const documentationDirectory = path.join(__dirname, ".."); // /git/starsky/documentation - without docs

function readFile(rootPath, from) {
const filename = path.join(rootPath, from);
if (fs.existsSync(filename) === false) {
return null;
}
return fs.readFileSync(filename, { encoding: "utf8" });
}

function replaceRobotsTxt() {
let robots = readFile(documentationDirectory, path.join("static", "robots.template"));
console.log(robots.length >= 1 ? "robots.template contains content" : "robots.template is empty");
Expand Down
8 changes: 0 additions & 8 deletions documentation/scripts/prestart.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ function writeFile(to, content) {
fs.writeFileSync(filename, content);
}

function readFile(rootPath, from) {
const filename = path.join(rootPath, from);
if (fs.existsSync(filename) === false) {
return null;
}
return fs.readFileSync(filename, { encoding: "utf8" });
}

copyFileSync("history.md", "advanced-options/history.md");
copyFileSync("starsky/telemetry.md", "advanced-options/starsky/telemetry.md");

Expand Down

0 comments on commit 34c8d90

Please sign in to comment.