1 Star 2 Fork 1

YuZhanglong / YuJudge

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

快速上手 | 调试与部署 | 版本日志

package-json react typescript

提示:Gitee上的版本可能会滞后(主要是我会忘记去同步,O(∩_∩)O),可访问 https://github.com/yuzhanglong/YuJudge 来获取最新版本!

快速上手

点击访问

在线DEMO

测试网站 CodeSandbox(可修改代码实时预览)

调试与部署

项目打包基于webpack,当前分支已经运行了yarn eject,webpack配置需要开发者自行管理。

webpack配置文件位于config/webpack目录之下。

yarn脚本文件位于script目录之下。

安装

yarn install

安装无法运行可以尝试(node-sass安装的问题)

npm install -g mirror-config-china --registry=http://registry.npm.taobao.org
yarn install

开发环境运行

yarn start

生产环境打包

yarn build

带外链的生产环境打包

打开package.json,修改 buildWithPrefix

"scripts": {
    "start": "node scripts/start.js",
    "build": "node scripts/build.js",
    "test": "node scripts/test.js",
    "buildWithPrefix": "node scripts/build.js http://cdn.yuzzl.top(你的外链地址)",
    "upload": "node scripts/upload.js"
}

执行

yarn buildWithPrefix

此时打包出来的所有js、css、图片(public文件夹内的静态文件除外)等依赖,均指向你的外链地址而不是build文件夹的根目录。

集成七牛存储服务

如果你使用七牛的云存储服务来保存静态文件的话,你可以试试:

打开script/upload.js, 找到下面内容,按照注释进行修改

// 上传凭证以及配置
const ACCESS_KEY = 'o4fgM7P2lPEyo3已经作废FZ7s_NGdo_xJVNDdKf55apCubX';
const SECRET_KEY = 'YxRkcS8o-GSLMo1已经作废ajWuLjeFxFsMo1WKnOvyrLjB8';
// bucket
const options = {
  scope: "yzlyz已经作废l123",
};
// 空间对应的机房
config.zone = uploader.zone.Zone_z2;

带外链打包

yarn buildWithPrefix

执行上传脚本

yarn upload

所有css、js等静态文件会被自动上传至七牛服务器,你只需要将index.html、一些图标文件传上服务器进行托管即可。

版本日志

最新版本 1.0.0

1.0.0

发布前后端项目至GitHub

MIT License Copyright (c) 2020 YuZhanglong 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.

简介

基于React+TypeScript 的 OnlineJudge(在线判题系统),附完整二次开发文档 展开 收起
TypeScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
TypeScript
1
https://gitee.com/yuzhanglong/YuJudge.git
git@gitee.com:yuzhanglong/YuJudge.git
yuzhanglong
YuJudge
YuJudge
master

搜索帮助