blob: 135e41a39e29ee5b4eac15e189e5554fd1bc2f97 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
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 \
${kv;hide:"p TS_PKG"} ${kv;hide:"pc magenta"}
### @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.
###
### @example
###
### TS_PACKAGE()
### TS_FILES(
### eslint.config.json
### prettierrc.json
### )
### END()
###
multimodule TS_PACKAGE {
module BUILD: _TS_BASE_UNIT {
.CMD=TS_PACK
.ALLOWED=TS_FILES
.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_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 {
}
}
|