From ccb55e404cbf69e42d0ac9671108fcad577241e7 Mon Sep 17 00:00:00 2001 From: rhysd Date: Sun, 10 Nov 2019 02:55:10 +0900 Subject: [PATCH] v1.0.2 --- index.html | 239 ----------------------------------------------------- write.js | 6 +- 2 files changed, 2 insertions(+), 243 deletions(-) delete mode 100644 index.html diff --git a/index.html b/index.html deleted file mode 100644 index b5e8209b9..000000000 --- a/index.html +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - Benchmarks - - - - -
- - - - - - - diff --git a/write.js b/write.js index 28160b183..3ccd7fa6e 100644 --- a/write.js +++ b/write.js @@ -16,6 +16,7 @@ const io = __importStar(require("@actions/io")); const core = __importStar(require("@actions/core")); const github = __importStar(require("@actions/github")); const git_1 = __importDefault(require("./git")); +const default_index_html_1 = require("./default_index_html"); const SCRIPT_PREFIX = 'window.BENCHMARK_DATA = '; async function loadDataJson(dataPath) { try { @@ -46,9 +47,6 @@ function addBenchmark(entries, name, bench) { } entries[name].push(bench); } -function readDefaultIndexHtml() { - return fs_1.promises.readFile('index.html', 'utf8'); -} async function addIndexHtmlIfNeeded(dir) { const indexHtml = path.join(dir, 'index.html'); try { @@ -59,7 +57,7 @@ async function addIndexHtmlIfNeeded(dir) { catch (_) { // Continue } - await fs_1.promises.writeFile(indexHtml, await readDefaultIndexHtml(), 'utf8'); + await fs_1.promises.writeFile(indexHtml, default_index_html_1.DEFAULT_INDEX_HTML, 'utf8'); await git_1.default('add', indexHtml); console.log('Created default index.html at', indexHtml); }