mirror of
https://github.com/zebrajr/react.git
synced 2025-12-07 12:20:38 +01:00
ghstack-source-id: bb66913e2d3c814696311371ed655f3da03d1199 Pull Request resolved: https://github.com/facebook/react-forget/pull/2926
17 lines
643 B
Bash
Executable File
17 lines
643 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
#
|
|
# This source code is licensed under the MIT license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
#
|
|
|
|
# Generates a TypeScript performance trace in a tmp folder, then runs the analyze-trace npm module
|
|
# to identify any hotspots that might cause slow compilation
|
|
# See https://github.com/microsoft/typescript-analyze-trace for CLI args
|
|
|
|
set -eo pipefail
|
|
|
|
tmp_dir=$(mktemp -d -t forget-XXXXXXXXXX)
|
|
./node_modules/typescript/bin/tsc -p ./tsconfig.json --generateTrace $tmp_dir --incremental false && npx @typescript/analyze-trace $tmp_dir "$@"
|