ts_package.conf 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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. ### @usage: TS_PACKAGE()
  7. ###
  8. ### The TypeScript/JavaScript library module, that does not need any compilation,
  9. ### and is just a set of files and NPM dependencies. List required files in TS_FILES macro.
  10. ### `package.json` is included by default.
  11. ###
  12. ### @example
  13. ###
  14. ### TS_PACKAGE()
  15. ### TS_FILES(
  16. ### eslint.config.json
  17. ### prettierrc.json
  18. ### )
  19. ### END()
  20. ###
  21. multimodule TS_PACKAGE {
  22. module BUILD: _TS_BASE_UNIT {
  23. .CMD=TS_PACK
  24. .ALLOWED=TS_FILES
  25. .ALIASES=FILES=TS_FILES SRCS=TS_FILES
  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_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${CURDIR}/package.json ${CURDIR}/pnpm-lock.yaml)
  30. _TS_ADD_NODE_MODULES_FOR_BUILDER()
  31. }
  32. }