ts.conf 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. NODEJS_ROOT=
  2. NODEJS_BIN=$NODEJS_ROOT/node
  3. NOTS_TOOL=${tool:"devtools/frontend_build_platform/nots/builder"}
  4. NOTS_TOOL_BASE_ARGS=--build-root $ARCADIA_BUILD_ROOT --bindir $BINDIR --curdir $CURDIR --nodejs-bin $NODEJS_BIN
  5. NOTS_TOOL_NODE_MODULES_BUNDLE=$BINDIR/node_modules.tar
  6. ERM_PACKAGES_PATH=devtools/frontend_build_platform/erm/erm-packages.json
  7. module _TS_BASE_UNIT: _BARE_UNIT {
  8. # Propagates peers to related modules
  9. .PEERDIR_POLICY=as_build_from
  10. .NODE_TYPE=Bundle
  11. # Needed for DEPENDS in tests to choose right submodule from multimodule
  12. .FINAL_TARGET=yes
  13. # use TS_FILES instead of FILES
  14. .ALIASES=FILES=TS_FILES
  15. # .NODE_TYPE=Bundle is required for peers propagation, but it also affects
  16. # how merging of pic/nopic graphs. Here we can override this merging behaviour
  17. SET(MODULE_TYPE LIBRARY)
  18. # Include processor works only for TS tag
  19. SET(MODULE_TAG TS)
  20. # TS should peer to TS
  21. SET(PEERDIR_TAGS TS)
  22. # .fake tells builder to not materialize it in results
  23. SET(MODULE_SUFFIX .ts.fake)
  24. # We read erm-packages.json during configuration, so we have to include it to configuration cache key
  25. SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${ARCADIA_ROOT}/$ERM_PACKAGES_PATH)
  26. # PEERDIR that reads required version of tool from package.json
  27. _PEERDIR_TS_RESOURCE(nodejs pnpm)
  28. }
  29. # tag:test
  30. ESLINT_CONFIG_PATH=.eslintrc.js
  31. _TS_LINT_SRCS_VALUE=
  32. ### _TS_CONFIG_EPILOGUE() # internal
  33. ###
  34. ### This macro executes macros which should be invoked after all user specified macros in the ya.make file
  35. macro _TS_CONFIG_EPILOGUE() {
  36. _GLOB(_TS_LINT_SRCS_VALUE ${CURDIR}/**/*.(ts|tsx|js|jsx) EXCLUDE node_modules/**/* build/**/* bundle/**/*)
  37. _SETUP_EXTRACT_NODE_MODULES_RECIPE(${MODDIR})
  38. }
  39. _TS_FILES_COPY_CMD=
  40. ### TS_FILES(Files...)
  41. ###
  42. ### Adds files to output as is. Similar to FILES but works for TS build modules
  43. macro TS_FILES(Files...) {
  44. _TS_FILES($Files)
  45. }
  46. @import "${CONF_ROOT}/conf/ts/node_modules.conf"
  47. @import "${CONF_ROOT}/conf/ts/ts_bundle.conf"
  48. @import "${CONF_ROOT}/conf/ts/ts_library.conf"
  49. @import "${CONF_ROOT}/conf/ts/ts_next.conf"
  50. @import "${CONF_ROOT}/conf/ts/ts_test.conf"
  51. @import "${CONF_ROOT}/conf/ts/ts_vite_bundle.conf"