mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: 支持题目导出
This commit is contained in:
1 parent
a5004a7c1b
commit
ee0f5deedc
11 files changed
+87
-33
No files matched your search
@@ -2,8 +2,8 @@ import Zip from 'adm-zip';
|
||||
import { safeLoad } from 'js-yaml';
|
||||
import { LocalProblemConfig } from '../interface';
|
||||
|
||||
export async function readConfig(filePath: string) {
|
||||
const data = new Zip(filePath);
|
||||
export async function readConfig(file: string | Buffer) {
|
||||
const data = new Zip(file);
|
||||
const entries = data.getEntries();
|
||||
for (const entry of entries) {
|
||||
if (entry.name.toLowerCase() === 'config.yaml') {
|
||||
|
||||
Reference in new issue
Block a user