Apply modifications to mass-produced boards
- 3 channel power sensor ina3221 - io expander pca9557 - Some gpio moves - ... Signed-off-by: YoungSoo Shin <shinys000114@gmail.com>
This commit is contained in:
@@ -4,13 +4,13 @@ set(GZ_OUTPUT_FILE ${WEB_APP_SOURCE_DIR}/dist/index.html.gz)
|
||||
|
||||
# Check npm is available
|
||||
find_program(NPM_EXECUTABLE npm)
|
||||
if(NOT NPM_EXECUTABLE)
|
||||
if (NOT NPM_EXECUTABLE)
|
||||
message(FATAL_ERROR "npm not found! Please install Node.js and npm.")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
# Register the component. Now, CMake knows how GZ_OUTPUT_FILE is generated
|
||||
# and can correctly handle the dependency for embedding.
|
||||
idf_component_register(SRC_DIRS "app" "nconfig" "wifi" "indicator" "system" "service" "ina226"
|
||||
idf_component_register(SRC_DIRS "app" "nconfig" "wifi" "indicator" "system" "service"
|
||||
INCLUDE_DIRS "include"
|
||||
EMBED_FILES ${GZ_OUTPUT_FILE}
|
||||
)
|
||||
@@ -18,12 +18,12 @@ idf_component_register(SRC_DIRS "app" "nconfig" "wifi" "indicator" "system" "ser
|
||||
# Define a custom command to build the web app.
|
||||
# This command explicitly tells CMake that it produces the GZ_OUTPUT_FILE.
|
||||
add_custom_command(
|
||||
OUTPUT ${GZ_OUTPUT_FILE}
|
||||
COMMAND npm install
|
||||
COMMAND npm run build
|
||||
WORKING_DIRECTORY ${WEB_APP_SOURCE_DIR}
|
||||
# Re-run the build if any of these files change
|
||||
DEPENDS
|
||||
OUTPUT ${GZ_OUTPUT_FILE}
|
||||
COMMAND npm install
|
||||
COMMAND npm run build
|
||||
WORKING_DIRECTORY ${WEB_APP_SOURCE_DIR}
|
||||
# Re-run the build if any of these files change
|
||||
DEPENDS
|
||||
${WEB_APP_SOURCE_DIR}/package.json
|
||||
${WEB_APP_SOURCE_DIR}/vite.config.js
|
||||
${WEB_APP_SOURCE_DIR}/index.html
|
||||
@@ -38,14 +38,14 @@ add_custom_command(
|
||||
${WEB_APP_SOURCE_DIR}/src/utils.js
|
||||
${WEB_APP_SOURCE_DIR}/src/websocket.js
|
||||
|
||||
COMMENT "Building Node.js project (npm install && npm run build)"
|
||||
VERBATIM
|
||||
COMMENT "Building Node.js project (npm install && npm run build)"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
# Create a target that depends on the output file. When this target is built,
|
||||
# it ensures the custom command above is executed first.
|
||||
add_custom_target(build_web_app ALL
|
||||
DEPENDS ${GZ_OUTPUT_FILE}
|
||||
DEPENDS ${GZ_OUTPUT_FILE}
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user