| OLD | NEW |
| 1 #!/usr/bin/env python2 | 1 #!/usr/bin/env python2 |
| 2 # -*- coding: utf-8 -*- | 2 # -*- coding: utf-8 -*- |
| 3 | 3 |
| 4 # Copyright 2015 Google Inc. All Rights Reserved. | 4 # Copyright 2015 Google Inc. All Rights Reserved. |
| 5 # | 5 # |
| 6 # Licensed under the Apache License, Version 2.0 (the "License"); | 6 # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 # you may not use this file except in compliance with the License. | 7 # you may not use this file except in compliance with the License. |
| 8 # You may obtain a copy of the License at | 8 # You may obtain a copy of the License at |
| 9 # | 9 # |
| 10 # http://www.apache.org/licenses/LICENSE-2.0 | 10 # http://www.apache.org/licenses/LICENSE-2.0 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 import bs4 | 34 import bs4 |
| 35 import colorama | 35 import colorama |
| 36 | 36 |
| 37 import chrome_app.apis | 37 import chrome_app.apis |
| 38 import chrome_app.manifest | 38 import chrome_app.manifest |
| 39 import configuration | 39 import configuration |
| 40 | 40 |
| 41 # Chrome APIs with polyfills available. | 41 # Chrome APIs with polyfills available. |
| 42 POLYFILLS = { | 42 POLYFILLS = { |
| 43 'notifications', | 43 'notifications', |
| 44 'storage', |
| 44 'tts', | 45 'tts', |
| 45 'storage' | |
| 46 } | 46 } |
| 47 | 47 |
| 48 # Manifest filenames. | 48 # Manifest filenames. |
| 49 CA_MANIFEST_FILENAME = chrome_app.manifest.MANIFEST_FILENAME | 49 CA_MANIFEST_FILENAME = chrome_app.manifest.MANIFEST_FILENAME |
| 50 PWA_MANIFEST_FILENAME = 'manifest.webmanifest' | 50 PWA_MANIFEST_FILENAME = 'manifest.webmanifest' |
| 51 | 51 |
| 52 # Name of the service worker registration script. | 52 # Name of the service worker registration script. |
| 53 REGISTER_SCRIPT_NAME = 'register_sw.js' | 53 REGISTER_SCRIPT_NAME = 'register_sw.js' |
| 54 | 54 |
| 55 # Name of the main service worker script. | 55 # Name of the main service worker script. |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 # Main program. | 613 # Main program. |
| 614 if args.mode == 'config': | 614 if args.mode == 'config': |
| 615 configuration.generate_and_save(args.output, args.interactive) | 615 configuration.generate_and_save(args.output, args.interactive) |
| 616 | 616 |
| 617 elif args.mode == 'convert': | 617 elif args.mode == 'convert': |
| 618 config = configuration.load(args.config) | 618 config = configuration.load(args.config) |
| 619 convert_app(args.input, args.output, config, args.force) | 619 convert_app(args.input, args.output, config, args.force) |
| 620 | 620 |
| 621 if __name__ == '__main__': | 621 if __name__ == '__main__': |
| 622 sys.exit(main()) | 622 sys.exit(main()) |
| OLD | NEW |