Slim down the files we embed into the binary.

- Use only the minified versions of bootstrap.

- Do not embed non-minified bootstrap files and bootstrap map files.

- Simplify the 'blob-stamp' Makefile contraption.
pull/470/head
Bjoern Rabenstein 10 years ago
parent 23f9279b9d
commit 7e5745fe0e

@ -14,7 +14,8 @@ do
cd "${dir}"
echo "\"$(basename ${dir})\": {"
find . -type f | while read file
# Do not embed map files and the non-minified bootstrap files.
find . -type f \! -name \*.map \! -name bootstrap.js \! -name bootstrap-theme.css \! -name bootstrap.css | while read file
do
name=$(echo "${file}"|sed 's|\.\/||')
echo "\"$name\": {"

@ -11,14 +11,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
all: blob-stamp
all: blob
blob-stamp: templates/*
blob:
$(MAKE) -C blob
touch $@
clean:
$(MAKE) -C blob clean
-rm -f *-stamp
.PHONY: clean
.PHONY: clean blob

@ -17,6 +17,7 @@ all: files.go
SUFFIXES:
# Do not embed map files and the non-minified bootstrap files.
files.go: $(shell find ../templates/ ../static/ -type f)
../../utility/embed-static.sh ../static ../templates | $(GOFMT) > $@

@ -5,7 +5,7 @@
<title>Prometheus Time Series Collection and Processing Server</title>
<script src="/static/vendor/js/jquery.min.js"></script>
<link type="text/css" rel="stylesheet" href="/static/vendor/bootstrap-3.3.1/css/bootstrap.css">
<link type="text/css" rel="stylesheet" href="/static/vendor/bootstrap-3.3.1/css/bootstrap.min.css">
<link type="text/css" rel="stylesheet" href="/static/css/prometheus.css">
{{template "head" .}}

Loading…
Cancel
Save