mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
w: 编译提速
This commit is contained in:
1 parent
6c6a0df0f0
commit
d037560f91
5 files changed
+8
-7
No files matched your search
+2
-1
@@ -58,9 +58,10 @@ for (const package of packages) {
|
||||
}
|
||||
fs.writeFileSync(path.resolve(process.cwd(), 'tsconfig.json'), JSON.stringify(config));
|
||||
|
||||
child.execSync('./node_modules/.bin/tsc -b packages/hydrooj', { stdio: 'inherit' });
|
||||
|
||||
if (argv.watch) {
|
||||
child.execSync('./node_modules/.bin/tsc -b --watch', { stdio: 'inherit' });
|
||||
} else {
|
||||
child.execSync('cd packages/hydrooj && yarn build', { stdio: 'inherit' });
|
||||
child.execSync('./node_modules/.bin/tsc -b', { stdio: 'inherit' });
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import xml2js from 'xml2js';
|
||||
import fs from 'fs-extra';
|
||||
import { filter } from 'lodash';
|
||||
import decodeHTML from 'decode-html';
|
||||
import { LocalProblemConfig } from 'hydrooj';
|
||||
import type { ProblemConfig } from 'hydrooj';
|
||||
import {
|
||||
Route, Handler, param, Types,
|
||||
} from 'hydrooj/dist/service/server';
|
||||
@@ -31,7 +31,7 @@ class FpsProblemImportHandler extends Handler {
|
||||
: [],
|
||||
hint: p.hint,
|
||||
}, 'html', this.translate.bind(this));
|
||||
const config: LocalProblemConfig = {
|
||||
const config: ProblemConfig = {
|
||||
time: p.time_limit[0]._ + p.time_limit[0].$.unit,
|
||||
memory: p.memory_limit[0]._ + p.memory_limit[0].$.unit,
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/fps-importer",
|
||||
"version": "1.1.4",
|
||||
"version": "1.1.5",
|
||||
"description": "Import FPS problems",
|
||||
"main": "package.json",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
@@ -4,7 +4,7 @@ import os from 'os';
|
||||
import fs from 'fs-extra';
|
||||
import AdmZip from 'adm-zip';
|
||||
import yaml from 'js-yaml';
|
||||
import { ContentNode, LocalProblemConfig } from 'hydrooj';
|
||||
import type { ContentNode, ProblemConfig } from 'hydrooj';
|
||||
import { Route, Handler } from 'hydrooj/dist/service/server';
|
||||
import storage from 'hydrooj/dist/service/storage';
|
||||
import { BadRequestError, ValidationError } from 'hydrooj/dist/error';
|
||||
@@ -76,7 +76,7 @@ class ImportQduojHandler extends Handler {
|
||||
const n = await problem.get(domainId, pdoc.display_id);
|
||||
if (n) pdoc.display_id = null;
|
||||
const pid = await problem.add(domainId, pdoc.display_id, pdoc.title, content, this.user._id, pdoc.tags);
|
||||
const config: LocalProblemConfig = {
|
||||
const config: ProblemConfig = {
|
||||
time: `${pdoc.time_limit}ms`,
|
||||
memory: `${pdoc.memory_limit}m`,
|
||||
subtasks: [],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/import-qduoj",
|
||||
"version": "1.1.2",
|
||||
"version": "1.1.3",
|
||||
"description": "Import QDUOJ problem export",
|
||||
"main": "package.json",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
Reference in new issue
Block a user