1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- PNPM_ROOT=
- PNPM_SCRIPT=$PNPM_ROOT/node_modules/pnpm/dist/pnpm.cjs
- NPM_ROOT=
- NPM_SCRIPT=$NPM_ROOT/node_modules/npm/bin/npm-cli.js
- PM_SCRIPT=
- PM_TYPE=
- # combined input/outputs records as list of directives ${input;hide:<path>} ${output;hide:<path>}, used in builders
- _NODE_MODULES_INOUTS=
- _YATOOL_PREBUILDER_ARG=
- macro _TS_ADD_NODE_MODULES_FOR_BUILDER() {
- # Calculate inputs and outputs of node_modules, fill `_NODE_MODULES_INOUTS` variable
- _NODE_MODULES_CONFIGURE()
- }
- _TARBALLS_STORE=__tarballs__
- _PREPARE_DEPS_INOUTS=
- _PREPARE_DEPS_RESOURCES=
- _PREPARE_DEPS_USE_RESOURCES_FLAG=
- _PREPARE_DEPS_CMD=$TOUCH_UNIT \
- && $NOTS_TOOL $NOTS_TOOL_BASE_ARGS prepare-deps \
- --tarballs-store $_TARBALLS_STORE \
- $_PREPARE_DEPS_INOUTS \
- $_PREPARE_DEPS_RESOURCES \
- $_PREPARE_DEPS_USE_RESOURCES_FLAG \
- ${hide;kv:"pc magenta"} ${hide;kv:"p TS_DEP"}
- # In case of no deps we need to create empty outputs for graph connectivity
- _PREPARE_NO_DEPS_CMD=$TOUCH_UNIT \
- && $YMAKE_PYTHON ${input:"build/scripts/touch.py"} \
- $_PREPARE_DEPS_INOUTS \
- ${hide;kv:"pc magenta"} ${hide;kv:"p TS_NODEP"}
- module _PREPARE_DEPS_BASE: _BARE_UNIT {
- .CMD=_PREPARE_DEPS_CMD
- .IGNORED=SRCS FILES TS_FILES COPY_FILE RUN_JAVASCRIPT_AFTER_BUILD
- # Propagates peers to related modules
- .PEERDIR_POLICY=as_build_from
- .NODE_TYPE=Bundle
- .INCLUDE_TAG=no
- # we have several modules in the same dir (.PEERDIRSELF=TS_PREPARE_DEPS in BUILD)
- # we need different names for module identity file
- # .fake tells builder to not materialize it in results
- SET(MODULE_SUFFIX .prepare_deps.fake)
- # .NODE_TYPE=Bundle is required for peers propagation, but it also affects
- # how merging of pic/nopic graphs. Here we can override this merging behaviour
- SET(MODULE_TYPE LIBRARY)
- # define own tag
- SET(MODULE_TAG TS_PREPARE_DEPS)
- SET(MODULE_LANG TS)
- # what modules it can PEERDIR to
- SET(PEERDIR_TAGS TS_PREPARE_DEPS)
- # do not include it into "results" of graph
- DISABLE(START_TARGET)
- # we read pnpm-lock.yaml and package.json during configuration
- SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${CURDIR}/pnpm-lock.yaml ${CURDIR}/package-lock.json ${CURDIR}/package.json)
- _SET_PACKAGE_MANAGER()
- _PREPARE_DEPS_CONFIGURE()
- }
|