mirror of
https://github.com/denoland/deno.git
synced 2025-09-29 13:44:47 +00:00
Clean up tools/
- Factor out tools/util.py - Move js/*.py to tools. - Rewrite tools/format.sh in python. - Run lint first in travis.
This commit is contained in:
parent
6c79b471aa
commit
f917c5e722
14 changed files with 123 additions and 150 deletions
26
tools/flatbufferjs_hack.py
Executable file
26
tools/flatbufferjs_hack.py
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env python
|
||||
"""
|
||||
gn can only run python scripts.
|
||||
|
||||
Generates flatbuffer TypeScript code.
|
||||
"""
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
import shutil
|
||||
import util
|
||||
|
||||
# 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)
|
||||
|
||||
util.touch(stamp_file)
|
Loading…
Add table
Add a link
Reference in a new issue