12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- TS_NEXT_OUTPUT_DIR=.next
- TS_NEXT_CONFIG_PATH=next.config.js
- TS_NEXT_CMD=$TOUCH_UNIT \
- && $_TS_FILES_COPY_CMD \
- && $ADD_VCS_INFO_FILE_CMD \
- && $NOTS_TOOL $NOTS_TOOL_BASE_ARGS build-next $NOTS_TOOL_COMMON_BUILDER_ARGS \
- --bundler-config-path ${input:TS_NEXT_CONFIG_PATH} \
- --output-dir ${TS_NEXT_OUTPUT_DIR} \
- $_NODE_MODULES_INOUTS ${hide:PEERS} \
- ${input;hide:"package.json"} ${TS_CONFIG_FILES} $_AS_HIDDEN_INPUTS(IN $TS_INPUT_FILES) \
- ${output;hide:"package.json"} \
- ${kv;hide:"pc magenta"} ${kv;hide:"p TS_NXT"}
- ### @usage: TS_NEXT()
- ###
- ### NextJS app, built with `next build`. Requires sources to be under /src folder.
- ### /pages and /app on the root level ar not supported.
- ### Build results are output.tar.
- ###
- ### @example
- ###
- ### TS_NEXT()
- ### END()
- ###
- multimodule TS_NEXT {
- module BUILD: _TS_BASE_UNIT {
- .CMD=TS_NEXT_CMD
- .EPILOGUE=_TS_CONFIG_EPILOGUE
- .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)
- _PEERDIR_TS_RESOURCE(next)
- DISABLE(TS_CONFIG_DEDUCE_OUT)
- DISABLE(TS_CONFIG_USE_OUTDIR)
- _TS_CONFIGURE($TS_CONFIG_PATH)
- SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${CURDIR}/package.json ${CURDIR}/pnpm-lock.yaml ${CURDIR}/${TS_CONFIG_PATH})
- _TS_ADD_NODE_MODULES_FOR_BUILDER()
- }
- module TS_PREPARE_DEPS: _PREPARE_DEPS_BASE {
- }
- }
- macro TS_NEXT_CONFIG(Path) {
- SET(TS_NEXT_CONFIG_PATH $Path)
- }
- ### @usage: TS_NEXT_OUTPUT(DirName)
- ###
- ### Macro sets the output directory name for TS_NEXT module.
- ###
- ### - DirName - output directory name ("bundle" by default).
- macro TS_NEXT_OUTPUT(DirName) {
- SET(TS_NEXT_OUTPUT_DIR $DirName)
- }
|