From cb50beb21719a2ee3ad7feefa931f3ca72869fce Mon Sep 17 00:00:00 2001 From: Don Cross Date: Sat, 6 Mar 2021 16:26:11 -0500 Subject: [PATCH] Deleted obsolete build script apply_exports_hack.py. This script was a hack used to make the JavaScript code work on both Node.js and in browsers. Now we build separate versions of the code for both environments, so we no longer need this script. --- generate/apply_exports_hack.py | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100755 generate/apply_exports_hack.py diff --git a/generate/apply_exports_hack.py b/generate/apply_exports_hack.py deleted file mode 100755 index 338994fe..00000000 --- a/generate/apply_exports_hack.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python3 -import sys - -if __name__ == '__main__': - if len(sys.argv) != 2: - print('USAGE: apply_exports_hack.py js_filename') - sys.exit(1) - filename = sys.argv[1] - with open(filename, 'rt') as infile: - text = infile.read() - - find = "})(this.Astronomy = {});" - repl = "})(typeof exports==='undefined' ? (this.Astronomy={}) : exports);" - - if text.find(find) < 0: - print('ERROR: could not find target text in file: {}'.format(filename)) - sys.exit(1) - - text = text.replace(find, repl) - - with open(filename, 'wt') as outfile: - outfile.write(text) - - print('apply_exports_hack.py: patched file {}'.format(filename)) - sys.exit(0)