Merge pull request #40 from ipfs/feat/add-build-script
feat: Build script
Showing
.github/workflows/build.yml
0 → 100644
This diff is collapsed.
gw-assets/icons.css
deleted
100644 → 0
This diff is collapsed.
gw-assets/style.css
deleted
100644 → 0
{ | ||
"name": "dir-index-html", | ||
"author": "lgierth", | ||
"description": "Directory listing HTML for go-ipfs gateways", | ||
"version": "1.2.0", | ||
"homepage": "https://github.com/ipfs/dir-index-html#readme", | ||
"bugs": { | ||
"url": "https://github.com/ipfs/dir-index-html" | ||
}, | ||
... | ... | @@ -11,8 +15,13 @@ |
"gxVersion": "0.14.0", | ||
"language": "go", | ||
"license": "MIT", | ||
"name": "dir-index-html", | ||
"releaseCmd": "git commit -a -m \"gx publish $VERSION\"", | ||
"version": "1.0.4" | ||
"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 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" | ||
} | ||
} | ||
src/icons.css
0 → 100644
This diff is collapsed.
src/style.css
0 → 100644
Please register or sign in to comment