Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
AutumnVN committed Jul 26, 2024
0 parents commit 021c319
Show file tree
Hide file tree
Showing 13 changed files with 2,464 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
OSU_API_KEY=
OSU_FOLDER_PATH=
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build

on:
push:
branches:
- main

permissions:
contents: write

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- uses: pnpm/action-setup@v4

- name: Install dependencies
run: pnpm i

- name: Build
run: pnpm build

- name: Release
run: |
gh release create release dist/osu-ubu.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
dist/
.env
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "pnpm start",
"name": "pnpm start",
"request": "launch",
"type": "node-terminal"
}
]
}
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions build.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { build } from 'esbuild';

await build({
entryPoints: ['src/index.ts'],
outfile: 'dist/index.js',
bundle: true,
treeShaking: true,
sourcemap: 'linked',
format: 'cjs',
target: 'esnext',
platform: 'node',
logLevel: 'error'
});
31 changes: 31 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import eslint from '@eslint/js';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import { rules } from 'eslint-plugin-unused-imports';
import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
{
ignores: ['node_modules', 'dist']
},
{
plugins: {
'simple-import-sort': simpleImportSort,
'unused-imports': {
meta: {
name: 'eslint-plugin-simple-import-sort',
version: '3.2.0',
},
rules
}
},
rules: {
quotes: ['error', 'single', { avoidEscape: true }],
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'unused-imports/no-unused-imports': 'error'
}
}
);
21 changes: 21 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"main": "dist/index.js",
"scripts": {
"build": "node build.mjs && node --experimental-sea-config sea.json && node -e \"require('fs').copyFileSync(process.execPath, 'dist/osu-ubu.exe')\" && pnpm dlx postject dist/osu-ubu.exe NODE_SEA_BLOB dist/sea.blob --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2",
"lint": "tsc && eslint .",
"start": "node build.mjs && node ."
},
"devDependencies": {
"@eslint/js": "^9.2.0",
"@types/node": "^20.12.12",
"esbuild": "^0.21.3",
"eslint": "^8.57.0",
"eslint-plugin-simple-import-sort": "^12.1.0",
"eslint-plugin-unused-imports": "^3.2.0",
"typescript": "^5.4.5",
"typescript-eslint": "^7.9.0"
},
"dependencies": {
"osu-buffer": "^2.0.2"
}
}
Loading

0 comments on commit 021c319

Please sign in to comment.