@cryptotaxi247 / kubo / commits / 02bcd0481

Minified file to top level, changes scripts and test accordingly

Jessica Schilling committed Jul 27, 2020 at 13:49 UTC 02bcd0481f7e4880f9e1d77d398f452f0967ad6a
4 files changed +7 -7
README.md
+1 -1
@@ -17,7 +17,7 @@
17 When making updates to the directory listing page template, please note the following:
18
19 1. Make your changes to the (human-friendly) source documents in the `src` directory
20 -2. Before testing or releasing, make sure to run the build script to generate a minified version in the `dist` directory:
20 +2. Before testing or releasing, make sure to run the build script to update the minified version in the top-level directory:
21
22 ```bash
23 > npm run build
dir-index.html renamed
package.json
+5 -5
@@ -18,10 +18,10 @@
18 "releaseCmd": "git commit -a -m \"gx publish $VERSION\"",
19 "scripts": {
20 "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",
21 - "build:clean": "rm -rf ./dist/*",
22 - "build:remove-style-links": "sed '/<link rel=\"stylesheet\"/d' ./src/dir-index.html > ./dist/base-html.html",
23 - "build:minify-wrap-css": "(echo \"<style>\" && cat ./src/icons.css ./src/style.css | tr -d \"\t\n\r\" && echo -e \"\\n</style>\") > ./dist/minified-wrapped-style.html",
24 - "build:combine-html-css": "sed '/<head>/ r ./dist/minified-wrapped-style.html' ./dist/base-html.html > ./dist/dir-index.html",
25 - "build:remove-unused": "rm ./dist/base-html.html && rm ./dist/minified-wrapped-style.html"
21 + "build:clean": "rm dir-index.html",
22 + "build:remove-style-links": "sed '/<link rel=\"stylesheet\"/d' ./src/dir-index.html > ./base-html.html",
23 + "build:minify-wrap-css": "(echo \"<style>\" && cat ./src/icons.css ./src/style.css | tr -d \"\t\n\r\" && echo -e \"\\n</style>\") > ./minified-wrapped-style.html",
24 + "build:combine-html-css": "sed '/<head>/ r ./minified-wrapped-style.html' ./base-html.html > ./dir-index.html",
25 + "build:remove-unused": "rm ./base-html.html && rm ./minified-wrapped-style.html"
26 }
27 }
test/main.go
+1 -1
@@ -8,7 +8,7 @@ import (
8 "text/template"
9 )
10
11 -const templateFile = "../dist/dir-index.html"
11 +const templateFile = "../dir-index.html"
12
13 // Copied from go-ipfs/core/corehttp/gateway_indexPage.go
14 type listingTemplateData struct {