From 02bcd0481f7e4880f9e1d77d398f452f0967ad6a Mon Sep 17 00:00:00 2001 From: Jessica Schilling Date: Mon, 27 Jul 2020 13:49:19 -0600 Subject: [PATCH] Minified file to top level, changes scripts and test accordingly --- README.md | 2 +- dist/dir-index.html => dir-index.html | 0 package.json | 10 +++++----- test/main.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename dist/dir-index.html => dir-index.html (100%) diff --git a/README.md b/README.md index 01e6a4a..c6d240b 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ When making updates to the directory listing page template, please note the following: 1. Make your changes to the (human-friendly) source documents in the `src` directory -2. Before testing or releasing, make sure to run the build script to generate a minified version in the `dist` directory: +2. Before testing or releasing, make sure to run the build script to update the minified version in the top-level directory: ```bash > npm run build diff --git a/dist/dir-index.html b/dir-index.html similarity index 100% rename from dist/dir-index.html rename to dir-index.html diff --git a/package.json b/package.json index c0edb94..2390a11 100644 --- a/package.json +++ b/package.json @@ -18,10 +18,10 @@ "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", "scripts": { "build": "npm run build:clean && npm run build:remove-style-links && npm run build:minify-wrap-css && npm run build:combine-html-css && npm run build:remove-unused", - "build:clean": "rm -rf ./dist/*", - "build:remove-style-links": "sed '/ ./dist/base-html.html", - "build:minify-wrap-css": "(echo \"\") > ./dist/minified-wrapped-style.html", - "build:combine-html-css": "sed '// r ./dist/minified-wrapped-style.html' ./dist/base-html.html > ./dist/dir-index.html", - "build:remove-unused": "rm ./dist/base-html.html && rm ./dist/minified-wrapped-style.html" + "build:clean": "rm dir-index.html", + "build:remove-style-links": "sed '/ ./base-html.html", + "build:minify-wrap-css": "(echo \"\") > ./minified-wrapped-style.html", + "build:combine-html-css": "sed '// r ./minified-wrapped-style.html' ./base-html.html > ./dir-index.html", + "build:remove-unused": "rm ./base-html.html && rm ./minified-wrapped-style.html" } } diff --git a/test/main.go b/test/main.go index 541404b..fc32083 100644 --- a/test/main.go +++ b/test/main.go @@ -8,7 +8,7 @@ import ( "text/template" ) -const templateFile = "../dist/dir-index.html" +const templateFile = "../dir-index.html" // Copied from go-ipfs/core/corehttp/gateway_indexPage.go type listingTemplateData struct { -- GitLab