ts_package.conf 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. macro _TS_PACKAGE_EPILOGUE() {
  7. _TS_PACKAGE_CHECK_FILES()
  8. }
  9. ### @usage: TS_PACKAGE()
  10. ###
  11. ### The TypeScript/JavaScript library module, that does not need any compilation,
  12. ### and is just a set of files and NPM dependencies. List required files in TS_FILES macro.
  13. ### `package.json` is included by default.
  14. ###
  15. ### @example
  16. ###
  17. ### TS_PACKAGE()
  18. ### TS_FILES(
  19. ### eslint.config.json
  20. ### prettierrc.json
  21. ### )
  22. ### END()
  23. ###
  24. multimodule TS_PACKAGE {
  25. module BUILD: _TS_BASE_UNIT {
  26. .CMD=TS_PACK
  27. .EPILOGUE=_TS_PACKAGE_EPILOGUE
  28. .ALLOWED=TS_FILES
  29. .ALIASES=FILES=TS_FILES SRCS=TS_FILES
  30. .PEERDIRSELF=TS_PREPARE_DEPS
  31. # by default multimodule overrides inherited MODULE_TAG to submodule name (BUILD in this case)
  32. # but we have to set it to TS for include processor to work
  33. SET(MODULE_TAG TS)
  34. SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${CURDIR}/package.json ${CURDIR}/pnpm-lock.yaml)
  35. _TS_ADD_NODE_MODULES_FOR_BUILDER()
  36. }
  37. module TS_PREPARE_DEPS: _PREPARE_DEPS_BASE {
  38. }
  39. }