Skip to content

Commit

Permalink
Add build command
Browse files Browse the repository at this point in the history
  • Loading branch information
TriangleYJ committed Mar 3, 2024
1 parent f051646 commit 465cb8c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,13 @@ https://github.com/TriangleYJ/BJShell/releases 에서 확인할 수 있습니다
6. 우측 표에서 `OnlineJudge` 항목을 찾습니다. 해당 항목 옆 Value 열에 있는 값을 더블클릭 한 뒤 복사합니다. 이후 BJ 쉘에 `Enter login token: ` 가 떠 있을 때 붙여넣고 엔터를 누릅니다.
7. 우측 표에서 `bojautologin` 항목을 찾습니다. 해당 항목 옆 Value 열에 있는 값을 더블클릭 한 뒤 복사합니다. 이후 BJ 쉘에 `(Optional) Enter autologin token: ` 가 떠있을 때 붙여넣고 엔터를 누릅니다.

## Run
`npm run dev`

## Build
1. `tsc && tsc-alias`
2. `cp package.json ./build`, Edit `./build/package.json` to
```
...
"main": "index.js",
"bin": "./index.js",
...
```
3. `pkg -t node16-linux-x64 .` or `pkg -t node16-linux-arm64 .`
`npm install -g typescript tsc-alias pkg`

`npm run build`

## License
This project is licensed under the terms of the MIT license.
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
"version": "1.0.0",
"description": "",
"main": "src/index.ts",
"bin": "./index.js",
"directories": {
"test": "test"
},
"scripts": {
"test": "jest",
"dev": "ts-node src"
"dev": "ts-node src",
"build": "tsc && tsc-alias && cp package.json build && cd build && pkg ."
},
"repository": {
"type": "git",
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env node

import { BJShell } from "./shell";
const shell = new BJShell();
shell.init();

0 comments on commit 465cb8c

Please sign in to comment.