Skip to content

Commit

Permalink
Fix data-client works on gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
lahmatiy committed Jul 10, 2022
1 parent c3389e6 commit 6f22021
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions scripts/build-gh-pages.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
const { copyFileSync, mkdirSync } = require("fs");
const { buildPlayground, buildBundle } = require("./build");
const {
buildPlayground,
buildBundle,
buildSelfSubscriber,
} = require("./build");

mkdirSync(".gh-pages", { recursive: true });
copyFileSync("playground/index.html", ".gh-pages/index.html");
copyFileSync("playground/index.css", ".gh-pages/index.css");
buildPlayground({
logLevel: "info",
write: true,
outfile: ".gh-pages/index.js",
});
buildBundle({
logLevel: "info",
write: true,
outfile: ".gh-pages/react-render-tracker.js",
});
copyFileSync(
"playground/data-client-example.js",
".gh-pages/data-client-example.js"
);
build(buildPlayground, ".gh-pages/index.js");
build(buildBundle, ".gh-pages/react-render-tracker.js");
build(buildSelfSubscriber, ".gh-pages/rrt-data-client.js");

function build(subject, outfile) {
subject({
logLevel: "info",
write: true,
outfile,
});
}

0 comments on commit 6f22021

Please sign in to comment.