summaryrefslogtreecommitdiff
path: root/js/flatbufferjs_hack.py
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-07-08 02:24:29 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-07-08 13:40:18 -0400
commitf917c5e722d7ee5abd58704eb0e5d49072249e94 (patch)
tree48eb2e95d18c9d1fbdfcd0864ca09a6e64d79f5a /js/flatbufferjs_hack.py
parent6c79b471aa5cf2c87d237015f5dacc5a7ed03b67 (diff)
Clean up tools/
- Factor out tools/util.py - Move js/*.py to tools. - Rewrite tools/format.sh in python. - Run lint first in travis.
Diffstat (limited to 'js/flatbufferjs_hack.py')
-rwxr-xr-xjs/flatbufferjs_hack.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/js/flatbufferjs_hack.py b/js/flatbufferjs_hack.py
deleted file mode 100755
index 2f411c1db..000000000
--- a/js/flatbufferjs_hack.py
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env python
-"""
-gn can only run python scripts.
-
-Generates flatbuffer TypeScript code.
-"""
-import subprocess
-import sys
-import os
-import shutil
-
-# TODO(ry) Ideally flatc output files should be written into target_gen_dir, but
-# its difficult to get this working in a way that parcel can resolve their
-# location. (Parcel does not support NODE_PATH.) Therefore this hack: write the
-# generated msg_generated.ts outputs into the js/ folder, and we check them into
-# the repo. Hopefully this hack can be removed at some point. If msg.fps is
-# changed, commit changes to the generated JS file.
-
-src = sys.argv[1]
-dst = sys.argv[2]
-stamp_file = sys.argv[3]
-
-shutil.copyfile(src, dst)
-
-
-def touch(fname):
- if os.path.exists(fname):
- os.utime(fname, None)
- else:
- open(fname, 'a').close()
-
-
-touch(stamp_file)