Commit 02bcd048 authored by Jessica Schilling's avatar Jessica Schilling

Minified file to top level, changes scripts and test accordingly

parent 39d74cd3
......@@ -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
......
......@@ -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 '/<link rel=\"stylesheet\"/d' ./src/dir-index.html > ./dist/base-html.html",
"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",
"build:combine-html-css": "sed '/<head>/ 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 '/<link rel=\"stylesheet\"/d' ./src/dir-index.html > ./base-html.html",
"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",
"build:combine-html-css": "sed '/<head>/ r ./minified-wrapped-style.html' ./base-html.html > ./dir-index.html",
"build:remove-unused": "rm ./base-html.html && rm ./minified-wrapped-style.html"
}
}
......@@ -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 {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment