1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- TS_PACK=$TOUCH_UNIT \
- && $NOTS_TOOL $NOTS_TOOL_BASE_ARGS build-package $_NODE_MODULES_INOUTS \
- && $COPY_CMD ${input:"package.json"} ${output:"package.json"} \
- && $_TS_FILES_COPY_CMD \
- ${hide;kv:"p TS_PKG"} ${hide;kv:"pc magenta"}
- ### # internal
- macro _TS_PACKAGE_EPILOGUE() {
- _TS_PACKAGE_CHECK_FILES()
- }
- ### @usage: TS_PACKAGE()
- ###
- ### The TypeScript/JavaScript library module, that does not need any compilation,
- ### and is just a set of files and NPM dependencies. List required files in TS_FILES macro.
- ### `package.json` is included by default.
- ###
- ### Documentation: https://docs.yandex-team.ru/frontend-in-arcadia/references/TS_PACKAGE
- ###
- ### @example
- ###
- ### TS_PACKAGE()
- ### TS_FILES(
- ### eslint.config.json
- ### prettierrc.json
- ### )
- ### END()
- ###
- multimodule TS_PACKAGE {
- module BUILD: _TS_BASE_UNIT {
- .CMD=TS_PACK
- .EPILOGUE=_TS_PACKAGE_EPILOGUE
- .ALLOWED=TS_FILES TS_FILES_GLOB
- .ALIASES=FILES=TS_FILES SRCS=TS_FILES
- .PEERDIRSELF=TS_PREPARE_DEPS
- # by default multimodule overrides inherited MODULE_TAG to submodule name (BUILD in this case)
- # but we have to set it to TS for include processor to work
- SET(MODULE_TAG TS)
- SET(MODULE_LANG TS)
- SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${CURDIR}/package.json ${CURDIR}/pnpm-lock.yaml)
- _TS_ADD_NODE_MODULES_FOR_BUILDER()
- }
- module TS_PREPARE_DEPS: _PREPARE_DEPS_BASE {
- }
- }
|