Skip to content

Commit

Permalink
build: 0.0.2버젼을 배포한다
Browse files Browse the repository at this point in the history
  • Loading branch information
bigsaigon333 committed Aug 19, 2021
1 parent 814fa2e commit a4ec707
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
17 changes: 17 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
/**
* @params filePath - PS코드의 절대경로
* @returns solve - 입력값을 인자로 받아 PS 코드 실행 결과를 string으로 반환하는 함수
*
* @example // BoJ 1000번 문제 풀이 1000.test.js
const path = require("path");
const genSolve = require("solve.io");
const solve = genSolve(path.resolve(__dirname, "1000.js"));
test("예제 1", async () => {
const input = `1 2`;
const output = `3
`;
expect(await solve(input)).toBe(output);
});
*/
declare const generateSolve: (filePath: string) => (input: string) => Promise<string>;
export = generateSolve;
17 changes: 17 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,23 @@ var path_1 = __importDefault(require("path"));
var util_1 = __importDefault(require("util"));
var child_process_1 = __importDefault(require("child_process"));
var exec = util_1.default.promisify(child_process_1.default.exec);
/**
* @params filePath - PS코드의 절대경로
* @returns solve - 입력값을 인자로 받아 PS 코드 실행 결과를 string으로 반환하는 함수
*
* @example // BoJ 1000번 문제 풀이 1000.test.js
const path = require("path");
const genSolve = require("solve.io");
const solve = genSolve(path.resolve(__dirname, "1000.js"));
test("예제 1", async () => {
const input = `1 2`;
const output = `3
`;
expect(await solve(input)).toBe(output);
});
*/
var generateSolve = function (filePath) {
if (!path_1.default.isAbsolute(filePath)) {
throw new TypeError("Invalid filePath: " + filePath + "\nfilePath should be an absolute path");
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "solve.io",
"version": "0.0.1",
"version": "0.0.2",
"description": "테스트 프레임워크를 이용한 알고리즘 문제 풀이를 위한 I/O 도구",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit a4ec707

Please sign in to comment.