ts_tsc.conf 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. TS_TSC_CMD=$TOUCH_UNIT \
  2. && $_TS_FILES_COPY_CMD \
  3. && $NOTS_TOOL $NOTS_TOOL_BASE_ARGS build-tsc $NOTS_TOOL_COMMON_BUILDER_ARGS \
  4. $_NODE_MODULES_INOUTS ${hide:PEERS} \
  5. ${hide;input:"package.json"} ${TS_CONFIG_FILES} $_AS_HIDDEN_INPUTS(IN $TS_INPUT_FILES) \
  6. ${hide;output:"package.json"} \
  7. ${hide;kv:"pc magenta"} ${hide;kv:"p TS_TSC"}
  8. ### @usage: TS_TSC([name])
  9. ###
  10. ### The TypeScript/JavaScript library module, compiles TypeScript sources to JavaScript using tsc.
  11. ### Build results are JavaScript files, typings and source mappings (depending on local tsconfig.json settings).
  12. ###
  13. ### Documentation: https://docs.yandex-team.ru/frontend-in-arcadia/references/TS_TSC
  14. ###
  15. ### @example
  16. ###
  17. ### TS_TSC()
  18. ###
  19. ### END()
  20. ###
  21. multimodule TS_TSC {
  22. module BUILD: _TS_BASE_UNIT {
  23. .CMD=TS_TSC_CMD
  24. .EPILOGUE=_TS_CONFIG_EPILOGUE
  25. .PEERDIRSELF=TS_PREPARE_DEPS
  26. # by default multimodule overrides inherited MODULE_TAG to submodule name (BUILD in this case)
  27. # but we have to set it to TS for include processor to work
  28. SET(MODULE_TAG TS)
  29. SET(MODULE_LANG TS)
  30. _PEERDIR_TS_RESOURCE(typescript)
  31. DISABLE(TS_CONFIG_DEDUCE_OUT)
  32. ENABLE(TS_CONFIG_USE_OUTDIR)
  33. _TS_CONFIGURE()
  34. SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${CURDIR}/package.json ${CURDIR}/pnpm-lock.yaml ${CURDIR}/package-lock.json ${CURDIR}/${TS_CONFIG_PATH})
  35. _TS_ADD_NODE_MODULES_FOR_BUILDER()
  36. }
  37. module TS_PREPARE_DEPS: _PREPARE_DEPS_BASE {
  38. }
  39. }