How to host the google libphonenumber locally?

后端 未结 3 1458
盖世英雄少女心
盖世英雄少女心 2020-12-28 21:40

During development on my localhost, I am trying to self host the libphonenumber library. I am trying with the following:



        
3条回答
  •  旧时难觅i
    2020-12-28 22:22

    Since google moved their code to github the process has changed, if only a little bit:

    1) go to http://closure-compiler.appspot.com/home

    2) insert the following

    // ==ClosureCompiler==
    // @compilation_level SIMPLE_OPTIMIZATIONS
    // @output_file_name libphonenumber.js
    // @use_closure_library true
    // @code_url https://github.com/googlei18n/libphonenumber/raw/master/javascript/i18n/phonenumbers/phonemetadata.pb.js
    // @code_url https://github.com/googlei18n/libphonenumber/raw/master/javascript/i18n/phonenumbers/phonenumber.pb.js
    // @code_url https://github.com/googlei18n/libphonenumber/raw/master/javascript/i18n/phonenumbers/metadata.js
    // @code_url https://github.com/googlei18n/libphonenumber/raw/master/javascript/i18n/phonenumbers/phonenumberutil.js
    // @code_url https://github.com/googlei18n/libphonenumber/raw/master/javascript/i18n/phonenumbers/asyoutypeformatter.js
    // @formatting pretty_print
    // ==/ClosureCompiler==
    

    3) Click Compile

    4) Done: The current compiled libphonenumber.js file should appear in the RHS panel

提交回复
热议问题