forked from elad/ng-phone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·16 lines (15 loc) · 1.17 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
curl -s -X POST -d output_format=text -d output_info=compiled_code -d use_closure_library=true \
-d code_url="https://raw.githubusercontent.com/googlei18n/libphonenumber/master/javascript/i18n/phonenumbers/asyoutypeformatter.js" \
-d code_url="https://raw.githubusercontent.com/googlei18n/libphonenumber/master/javascript/i18n/phonenumbers/phonenumberutil.js" \
-d code_url="https://raw.githubusercontent.com/googlei18n/libphonenumber/master/javascript/i18n/phonenumbers/regioncodefortesting.js" \
-d code_url="https://raw.githubusercontent.com/googlei18n/libphonenumber/master/javascript/i18n/phonenumbers/phonemetadata.pb.js" \
-d code_url="https://raw.githubusercontent.com/googlei18n/libphonenumber/master/javascript/i18n/phonenumbers/metadata.js" \
-d code_url="https://raw.githubusercontent.com/googlei18n/libphonenumber/master/javascript/i18n/phonenumbers/phonenumber.pb.js" \
--data-urlencode js_code@closure.js \
-o phoneformat.min.js \
http://closure-compiler.appspot.com/compile
NG_PHONE_WRAPPER=$(<ng-phone-wrapper.js)
PHONEFORMAT_CLOSURE=$(<phoneformat.min.js)
echo "${NG_PHONE_WRAPPER//__COMPILED_CLOSURE__/$PHONEFORMAT_CLOSURE}" > ng-phone.js
rm phoneformat.min.js