diff options
author | vturov <vturov@yandex-team.com> | 2024-07-05 14:41:49 +0300 |
---|---|---|
committer | vturov <vturov@yandex-team.com> | 2024-07-05 14:54:31 +0300 |
commit | 61f8eb355e956fd03694c3e307e827e24dca9b10 (patch) | |
tree | 53be39a0266d37e018575882a1a6f2f73b1216d8 /build/conf | |
parent | 1d6fb2a5cf56114e8f127c0be7698c9dbe09d480 (diff) | |
download | ydb-61f8eb355e956fd03694c3e307e827e24dca9b10.tar.gz |
Allow indexing Typescript files for code navigation
- Create macro to execute on specific ya-bin option
- Update tsyndexer to have single file output, update README
cf44f72c9b83a9e88ecb0d0c4fab3fe80b235ce9
Diffstat (limited to 'build/conf')
-rw-r--r-- | build/conf/ts/ts.conf | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/build/conf/ts/ts.conf b/build/conf/ts/ts.conf index 78221c6de3..0556da4cb9 100644 --- a/build/conf/ts/ts.conf +++ b/build/conf/ts/ts.conf @@ -3,6 +3,7 @@ NODEJS_BIN=$NODEJS_ROOT/node TS_TRACE=no TS_LOCAL_CLI=no +TS_YNDEXING=no # Use outdir defined in tsconfig (actual not for bundlers, they use own way to define output directory) TS_CONFIG_USE_OUTDIR= @@ -89,7 +90,6 @@ module _TS_BASE_UNIT: _BARE_UNIT { _PEERDIR_TS_RESOURCE(nodejs pnpm) } - # tag:test ESLINT_CONFIG_PATH=.eslintrc.js @@ -116,6 +116,23 @@ macro _TS_CONFIG_EPILOGUE() { _SETUP_BUILD_ENV() } +TSYNDEXER_OUTPUT_FILE=tsyndex.ydx.pb2 +TSYNDEXER_TOOL=${tool:"devtools/codenav/typescript"} +TSYNDEXER_CMD=${cwd:ARCADIA_BUILD_ROOT} \ + $TSYNDEXER_TOOL -m ${CURDIR} -o ${output:TSYNDEXER_OUTPUT_FILE} -r ${ARCADIA_ROOT} \ + ${kv;hide:"pc magenta"} ${kv;hide:"p YTS"} $_AS_HIDDEN_INPUTS(IN $_TS_LINT_SRCS_VALUE) + +### _DO_TS_YNDEXING() # internal +### +### Adds a command-node for TS-modules codenavigation indexing. +### Output ydx.pb2 file will be processed along with other indexes for other modules and +### other languages in ya-bin. +### (see _gen_merge_node, _gen_upload_node in devtools/ya/build/graph.py) for details. +### The macro is called from nots.py plugin in case we have `TS_YNDEXING=yes` flag set. +macro _DO_TS_YNDEXING() { + .CMD=$TSYNDEXER_CMD +} + # Used as inputs in TS_COMPILE through `$_AS_HIDDEN_INPUTS(IN $TS_INPUT_FILES)` TS_INPUT_FILES= |