Giter VIP home page Giter VIP logo

portal's Introduction

KubeAGI 前端 portal kubeagi-portal

KubeAGI 的前端 portal


开发构建

快速开始

克隆项目:

git clone https://github.com/kubeagi/portal.git
# 如果还没有 git 地址,可以先在项目中执行 git init --initial-branch=main 后再初始化 submodule
git submodule update --init --recursive

环境要求:

  • Node.js v18.x
  • pnpm v8.x

进入目录安装依赖:

npm i pnpm @antfu/ni -g
ni

开发:

nr dev

构建

仅构建静态文件

nr build

构建镜像

执行以下命令可在本地构建镜像:

chmod +x ./build.sh ./update_base_image.sh
./build.sh

PS:推荐使用我们的流水线进行镜像构建,支持 CI/CD 等功能,创建流水线时可参考 流水线 umi-demo-portal

运行镜像:

docker run -d -p 8000:80 172.22.50.223/dev-branch/kubeagi-portal:main

然后浏览器中打开 http://localhost:8000/KubeAGI/test 即可访问 portal。

代码风格检查

初始化 git hooks 工具 husky:

npx husky add .husky/pre-commit 'npm run lint-staged'
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit "$1"'
chmod +x .husky/pre-commit .husky/commit-msg
# 记得提交初始化好的 husky 脚本
git add .husky/

注意:初始化项目后一定要再初始化下 git hooks 工具 husky,记得提交初始化好的 husky 脚本。

执行 lint 检查:

nr lint

注意事项: lint 规则默认忽略了 js、jsx 及 index.css 文件,这些文件一般都是低代码平台自动生成的,如果要手动开发页面,请使用 ts、tsx 及 less。

portal's People

Contributors

carrotzpc avatar jiyaning avatar linqiqi077 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.