Faster script execution by ts-node

Summary: It takes few seconds for ts-node to start even for small scripts. TS_NODE_TRANSPILE_ONLY env var makes loading much faster ~100-200ms.

Reviewed By: mweststrate

Differential Revision: D20769639

fbshipit-source-id: 9b09a4e128e6b9c9651de98d8193b1d3a8f42b64
This commit is contained in:
Anton Nikolaev
2020-04-01 02:49:46 -07:00
committed by Facebook GitHub Bot
parent 3bdfea387b
commit 5dc3ab4ea2
3 changed files with 21 additions and 6 deletions

7
desktop/ts-node Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
env TS_NODE_TRANSPILE_ONLY=true node --require ts-node/register "$@"