1 Star 1 Fork 0

f2e-server / f2e-react-app

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

f2e-react-app

介绍

集成 antd 的 SPA模板

环境依赖

  • node v14+
  • npm/yarn/pnpm
  • java(使用swagger接口编译前端ts文件)

安装构建

npm i f2e-server -g
f2e create myApp
cd myApp
# 安装依赖
npm i
# 编译swagger接口
npm run api
# 启动开发环境
npm run dev
# 执行编,需要bash环境,windows 推荐 git-bash
sh ./build.sh
# 执行Docker构建,需要bash环境,windows 推荐 git-bash
sh ./build-docker.sh

软件功能

  1. 基于 esbuild 构建ts(x) 代码模块
  2. 使用 externals 优化开发环境构建速度
  3. 编译 less 为 css
  4. 支持编译swagger接口到前端接口
    • 更新 .autos/apis.json 文件
    • 执行 npm run api
    • 修改对应前端代码即可
  5. 支持接口代理
  6. 支持服务端开发
  7. 支持Docker构建
    • 构建结果为node项目模板
    • 为了压缩镜像大小, 基础镜像使用ubuntu, COPY node 可执行文件内部使用

目录说明

├── .autos              # auto-service(swaggerAPI) 配置目录
│   ├── apis.json       # swagger 接口配置源文件
│   ├── json2service.js # 编译配置    https://gogoyqj.github.io/auto-service/
│   └── swagger.d.ts    # 接口配置描述文件
├── .esbuild            # esbuild编译临时目录, 需要添加到 .gitignore
├── .esbuildrc.js       # esbuild编译配置文件
├── .f2econfig.js       # f2e-server核心配置文件
├── .gitignore
├── .npmrc              # 默认配置了 npmmirror.com
├── README.md
├── css                 # css存放目录
├── index.html          # 前端入口文件
├── lib                 # 服务端编译commonjs目标目录, 需要添加到 .gitignore
├── package-lock.json
├── package.json
├── serve               # 服务端源代码目录,运行时会编译到 lib 目录
│   └── index.ts
├── src                 # 前端代码目录
│   ├── App.less
│   ├── App.tsx
│   ├── global.d.ts     # 一些全局ts配置
│   ├── index.tsx
│   ├── service         # auto-service 生成文件目录 需要添加到 .gitignore
│   └── utils
├── start.js            # 携带服务端部署时需要的启动文件
├── tsconfig.json       # 前端ts配置文件
└── tsconfig.serve.json # 后端ts配置文件
MIT License Copyright (c) 2023 云香水识 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

集成 antd 的 SPA模板 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
TypeScript
1
https://gitee.com/f2e-server/f2e-react-app.git
git@gitee.com:f2e-server/f2e-react-app.git
f2e-server
f2e-react-app
f2e-react-app
master

搜索帮助