chore: add Makefile (#53)
* chore: update license * chore: add Makefile
This commit is contained in:
parent
34f2f3bcce
commit
0926005632
42
Makefile
42
Makefile
|
@ -13,3 +13,45 @@ APP_PLUGIN_FOLDER := plugin
|
||||||
# GO15VENDOREXPERIMENT="1" GO111MODULE=off easyjson -all domain.go
|
# GO15VENDOREXPERIMENT="1" GO111MODULE=off easyjson -all domain.go
|
||||||
include ../framework/Makefile
|
include ../framework/Makefile
|
||||||
|
|
||||||
|
|
||||||
|
NVM_VERSION=0.39.3
|
||||||
|
NODE_VERSION=16.20.2
|
||||||
|
NVM_INSTALL_URL=https://raw.githubusercontent.com/nvm-sh/nvm/v$(NVM_VERSION)/install.sh
|
||||||
|
|
||||||
|
# Initialize the web development environment
|
||||||
|
init-web-dev:
|
||||||
|
@if ! command -v nvm > /dev/null 2>&1; then \
|
||||||
|
echo "nvm not found. Installing..."; \
|
||||||
|
curl -o- $(NVM_INSTALL_URL) | bash; \
|
||||||
|
export NVM_DIR="$$(echo ~/.nvm)"; \
|
||||||
|
[ -s "$$NVM_DIR/nvm.sh" ] && \. "$$NVM_DIR/nvm.sh"; \
|
||||||
|
fi; \
|
||||||
|
export NVM_DIR="$$(echo ~/.nvm)"; \
|
||||||
|
[ -s "$$NVM_DIR/nvm.sh" ] && \. "$$NVM_DIR/nvm.sh"; \
|
||||||
|
nvm install $(NODE_VERSION); \
|
||||||
|
nvm use $(NODE_VERSION); \
|
||||||
|
echo "Using Node.js version: $$(node -v)"; \
|
||||||
|
(cd web && npm install)
|
||||||
|
|
||||||
|
# Clean node_modules
|
||||||
|
clean-web-dev:
|
||||||
|
@echo "Cleaning node_modules..."
|
||||||
|
@(cd web && rm -rf node_modules)
|
||||||
|
@echo "Done."
|
||||||
|
|
||||||
|
# Lint the code
|
||||||
|
web-lint:
|
||||||
|
@echo "Running lint..."
|
||||||
|
@(cd web && npx eslint . --ext .js,.jsx,.ts,.tsx)
|
||||||
|
@echo "Linting complete."
|
||||||
|
|
||||||
|
# Build the web app
|
||||||
|
build-web:
|
||||||
|
@echo "Building the web app..."
|
||||||
|
@(cd web && npm run build)
|
||||||
|
@echo "Build complete."
|
||||||
|
|
||||||
|
# Run the development server
|
||||||
|
dev-web:
|
||||||
|
@echo "Starting the development server..."
|
||||||
|
@(cd web && npm run dev)
|
|
@ -5,7 +5,7 @@
|
||||||
"title": "INFINI Console",
|
"title": "INFINI Console",
|
||||||
"description": "Pursuing Excellence, Infinite Possibilities!",
|
"description": "Pursuing Excellence, Infinite Possibilities!",
|
||||||
"author": "INFINI.LTD",
|
"author": "INFINI.LTD",
|
||||||
"license": "INFINI-EULA",
|
"license": "AGPL-3.0-or-later",
|
||||||
"official_website": "https://infinilabs.com",
|
"official_website": "https://infinilabs.com",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ant-design/charts": "1.4.2",
|
"@ant-design/charts": "1.4.2",
|
||||||
|
|
Loading…
Reference in New Issue