ts_package.conf 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. TS_PACK=$TOUCH_UNIT \
  2. && $NOTS_TOOL $NOTS_TOOL_BASE_ARGS build-package $_NODE_MODULES_INOUTS \
  3. && $COPY_CMD ${input:"package.json"} ${output:"package.json"} \
  4. && $_TS_FILES_COPY_CMD \
  5. ${kv;hide:"p TS_PKG"} ${kv;hide:"pc magenta"}
  6. ### # internal
  7. macro _TS_PACKAGE_EPILOGUE() {
  8. _TS_PACKAGE_CHECK_FILES()
  9. }
  10. ### @usage: TS_PACKAGE()
  11. ###
  12. ### The TypeScript/JavaScript library module, that does not need any compilation,
  13. ### and is just a set of files and NPM dependencies. List required files in TS_FILES macro.
  14. ### `package.json` is included by default.
  15. ###
  16. ### Documentation: https://docs.yandex-team.ru/frontend-in-arcadia/references/TS_PACKAGE
  17. ###
  18. ### @example
  19. ###
  20. ### TS_PACKAGE()
  21. ### TS_FILES(
  22. ### eslint.config.json
  23. ### prettierrc.json
  24. ### )
  25. ### END()
  26. ###
  27. multimodule TS_PACKAGE {
  28. module BUILD: _TS_BASE_UNIT {
  29. .CMD=TS_PACK
  30. .EPILOGUE=_TS_PACKAGE_EPILOGUE
  31. .ALLOWED=TS_FILES TS_FILES_GLOB
  32. .ALIASES=FILES=TS_FILES SRCS=TS_FILES
  33. .PEERDIRSELF=TS_PREPARE_DEPS
  34. # by default multimodule overrides inherited MODULE_TAG to submodule name (BUILD in this case)
  35. # but we have to set it to TS for include processor to work
  36. SET(MODULE_TAG TS)
  37. SET(MODULE_LANG TS)
  38. SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${CURDIR}/package.json ${CURDIR}/pnpm-lock.yaml)
  39. _TS_ADD_NODE_MODULES_FOR_BUILDER()
  40. }
  41. module TS_PREPARE_DEPS: _PREPARE_DEPS_BASE {
  42. }
  43. }