Mais conteúdo relacionado Semelhante a ライブラリにあらず! 〜Google Closure Toolsの事始め〜 (20) Mais de Kazuya Hiruma (20) ライブラリにあらず! 〜Google Closure Toolsの事始め〜14. Buildする
$ java -jar SoyToJsSrcCompiler.jar
--shouldProvideRequireSoyNamespaces
--outputPathFormat simple.js simple.soy
15. Buildする
$ java -jar SoyToJsSrcCompiler.jar
--shouldProvideRequireSoyNamespaces
--outputPathFormat simple.js simple.soy
19. Compileする
SRC = js/hoge.js js/fuga.js
COMBINE = js/hoge.prod.js
COMPRESS = js/hoge.prod.min.js
$(COMBINE) : $(SRC)
cat $^ > $@
java -jar /Applications/gcc/compiler.jar
--js $(COMBINE)
--js_output_file $(COMPRESS)
.PHONY: clean
clean :
rm -f $(COMBINE) $(COMPRESS)
弊社で使われているshell script
20. Compileする
SRC = js/hoge.js js/fuga.js
COMBINE = js/hoge.prod.js
COMPRESS = js/hoge.prod.min.js
$(COMBINE) : $(SRC)
cat $^ > $@
java -jar /Applications/gcc/compiler.jar
--js $(COMBINE)
--js_output_file $(COMPRESS)
.PHONY: clean
clean :
rm -f $(COMBINE) $(COMPRESS)
弊社で使われているshell script
25. Build
$ python ./closure-library/closure/bin/build/
closurebuilder.py
--root=./js
--root=./closure-library
--namespace="hoge"
--output_mode=compiled
--output_file=hoge.min.js
--compiler_jar=/Applications/gcc/compiler.jar
-f "--define=goog.DEBUG=false"
圧縮のレベルを指定するオプション
#-f "--compilation_level=ADVANCED_OPTIMIZATIONS"
26. Build
$ python ./closure-library/closure/bin/build/
closurebuilder.py
--root=./js
--root=./closure-library
--namespace="hoge"
--output_mode=compiled
--output_file=hoge.min.js
--compiler_jar=/Applications/gcc/compiler.jar
-f "--define=goog.DEBUG=false"
圧縮のレベルを指定するオプション
#-f "--compilation_level=ADVANCED_OPTIMIZATIONS"
30. Appendix
• Google Closure Tools
• Google Closure Library
• Google Closure Templates
• Google Closure Compiler
• Google Closure compilerをオンラインで
• Closure Libraryによるアプリ開発のはじめ方
Notas do Editor \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n