-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
470 additions
and
334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"name": "bilicli", | ||
"version": "0.3.2", | ||
"description": "Bilibili-live danmu dashboard in your terminal.", | ||
"homepage": "https://github.com/ddiu8081/bilicli#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/ddiu8081/bilicli" | ||
}, | ||
"scripts": { | ||
"dev": "tsup --watch", | ||
"build": "tsup" | ||
}, | ||
"bin": { | ||
"bilicli": "bin/bilicli.js" | ||
}, | ||
"main": "dist/main.js", | ||
"files": [ | ||
"bin", | ||
"dist" | ||
], | ||
"keywords": [ | ||
"bilibili", | ||
"bilibili-live", | ||
"danmaku", | ||
"danmu", | ||
"terminal", | ||
"cli", | ||
"tui" | ||
], | ||
"author": "ddiu8081 <ddiu8081@gmail.com>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"tsup": "^6.2.3" | ||
}, | ||
"dependencies": { | ||
"cac": "^6.7.14", | ||
"@bilicli/live": "workspace:*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { startApp } from '@bilicli/live' | ||
|
||
interface ArgOptions { | ||
badge: boolean | ||
rank: boolean | ||
} | ||
|
||
const live = async(roomId: string, options: ArgOptions) => { | ||
startApp(~~roomId, { | ||
badge: options.badge, | ||
rank: options.rank, | ||
}) | ||
} | ||
|
||
export { live } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/env node | ||
import { name, version } from '../package.json' | ||
import { cac } from 'cac' | ||
|
||
import { live } from './actions/live' | ||
|
||
const cli = cac(name) | ||
|
||
// create | ||
cli | ||
.command('live <room_id>', 'Open live console in full mode') | ||
.option('--no-badge', 'Hide badge of user') | ||
.option('--no-rank', 'Hide rank of user') | ||
.action(live) | ||
|
||
cli.help() | ||
cli.version(version) | ||
|
||
cli.parse() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "esnext", | ||
"module": "esnext", | ||
"lib": [ | ||
"esnext", | ||
"dom" | ||
], | ||
"moduleResolution": "node", | ||
"declaration": true, | ||
"esModuleInterop": true, | ||
"sourceMap": false, | ||
"resolveJsonModule": true | ||
}, | ||
"include": ["src/**/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { defineConfig } from 'tsup' | ||
|
||
export default defineConfig({ | ||
format: ['cjs', 'esm'], | ||
entry: [ | ||
'src/index.ts', | ||
], | ||
dts: { | ||
resolve: true, | ||
entry: './src/index.ts', | ||
}, | ||
clean: true, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name": "@bilicli/live", | ||
"version": "0.3.2", | ||
"description": "", | ||
"scripts": { | ||
"dev": "temir src/index.ts", | ||
"build": "temir build src/index.ts" | ||
}, | ||
"main": "dist/main.js", | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"bin", | ||
"dist" | ||
], | ||
"exports": { | ||
".": { | ||
"require": "./dist/index.js", | ||
"import": "./dist/index.mjs" | ||
} | ||
}, | ||
"keywords": [ | ||
"bilibili", | ||
"bilibili-live", | ||
"danmaku", | ||
"danmu", | ||
"terminal", | ||
"cli", | ||
"tui" | ||
], | ||
"author": "ddiu8081 <ddiu8081@gmail.com>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@temir/cli": "^0.0.20" | ||
}, | ||
"dependencies": { | ||
"@temir/core": "^0.0.20", | ||
"@temir/link": "^0.0.20", | ||
"@temir/tab": "^0.0.20", | ||
"blive-message-listener": "^0.3.0", | ||
"dayjs": "^1.11.5", | ||
"ohmyfetch": "^0.4.19", | ||
"vue": "^3.2.40" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ declare module '*.vue' { | |
} | ||
|
||
interface AppOptions { | ||
roomId: number | ||
badge: boolean | ||
rank: boolean | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { render } from '@temir/core' | ||
import { h } from 'vue' | ||
import App from './App.vue' | ||
|
||
const startApp = (roomId: number, options: AppOptions) => { | ||
const NewApp = { | ||
render() { | ||
return h(App, { roomId, options }) | ||
} | ||
} | ||
|
||
render(NewApp) | ||
} | ||
|
||
export { startApp } |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default { | ||
format: ['cjs', 'esm'], | ||
entry: [ | ||
'src/index.ts', | ||
], | ||
dts: { | ||
resolve: true, | ||
entry: './src/index.ts', | ||
}, | ||
clean: true, | ||
} |
Oops, something went wrong.