Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
dir-index-html
Commits
02bcd048
Commit
02bcd048
authored
Jul 27, 2020
by
Jessica Schilling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minified file to top level, changes scripts and test accordingly
parent
39d74cd3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
README.md
README.md
+1
-1
dir-index.html
dir-index.html
+0
-0
package.json
package.json
+5
-5
test/main.go
test/main.go
+1
-1
No files found.
README.md
View file @
02bcd048
...
...
@@ -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
gener
ate
a
minified version in the
`dist`
directory:
2.
Before testing or releasing, make sure to run the build script to
upd
ate
the
minified version in the
top-level
directory:
```
bash
>
npm run build
...
...
dist/
dir-index.html
→
dir-index.html
View file @
02bcd048
File moved
package.json
View file @
02bcd048
...
...
@@ -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"
}
}
test/main.go
View file @
02bcd048
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment