소스 검색

Added new "compilation" step to javascript.

Kelly Norton 8 년 전
부모
커밋
e1528a83f9
2개의 변경된 파일33개의 추가작업 그리고 17개의 파일을 삭제
  1. 19 2
      Makefile
  2. 14 15
      web/bindata.go

+ 19 - 2
Makefile

@@ -1,7 +1,24 @@
+CPP = /usr/bin/cpp -P -undef -Wundef -std=c99 -nostdinc -Wtrigraphs -fdollars-in-identifiers -C -Wno-invalid-pp-token
+
+SRC = $(shell find web/assets -maxdepth 1 -type f)
+DST = $(subst web/assets,.build/assets,$(SRC))
+
 ALL: web/bindata.go
 
 .build/bin/go-bindata:
 	GOPATH=$(shell pwd)/.build go get github.com/jteeuwen/go-bindata/...
 
-web/bindata.go: .build/bin/go-bindata $(wildcard web/assets/*)
-	$< -o $@ -pkg web -prefix web/assets -nomemcopy web/assets/...
+.build/assets:
+	mkdir -p $@
+
+.build/assets/%.js: web/assets/%.js
+	$(CPP) $< | closure-compiler --js_output_file $@
+
+.build/assets/%: web/assets/%
+	cp $< $@
+
+web/bindata.go: .build/bin/go-bindata .build/assets $(DST)
+	$< -o $@ -pkg web -prefix .build/assets -nomemcopy .build/assets/...
+
+clean:
+	rm -rf .build/assets web/bindata.go

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 14 - 15
web/bindata.go


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.