From 2504df59ab4c61fadace097ef6cadd7fd8d817bd Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Sat, 18 Oct 2025 21:39:26 +0800 Subject: [PATCH] feat: init commit --- .gitignore | 2 ++ hello_world/.gitignore | 34 ++++++++++++++++++++++++++++++++++ hello_world/README.md | 15 +++++++++++++++ hello_world/bun.lock | 29 +++++++++++++++++++++++++++++ hello_world/index.ts | 1 + hello_world/package.json | 12 ++++++++++++ hello_world/tsconfig.json | 29 +++++++++++++++++++++++++++++ single-scripts/hello_world.ts | 1 + 8 files changed, 123 insertions(+) create mode 100644 hello_world/.gitignore create mode 100644 hello_world/README.md create mode 100644 hello_world/bun.lock create mode 100644 hello_world/index.ts create mode 100644 hello_world/package.json create mode 100644 hello_world/tsconfig.json create mode 100644 single-scripts/hello_world.ts diff --git a/.gitignore b/.gitignore index d4777d2..5010e20 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +node_modules/ +.idea/ # ---> macOS # General .DS_Store diff --git a/hello_world/.gitignore b/hello_world/.gitignore new file mode 100644 index 0000000..a14702c --- /dev/null +++ b/hello_world/.gitignore @@ -0,0 +1,34 @@ +# dependencies (bun install) +node_modules + +# output +out +dist +*.tgz + +# code coverage +coverage +*.lcov + +# logs +logs +_.log +report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# caches +.eslintcache +.cache +*.tsbuildinfo + +# IntelliJ based IDEs +.idea + +# Finder (MacOS) folder config +.DS_Store diff --git a/hello_world/README.md b/hello_world/README.md new file mode 100644 index 0000000..54b4f36 --- /dev/null +++ b/hello_world/README.md @@ -0,0 +1,15 @@ +# hello_world + +To install dependencies: + +```bash +bun install +``` + +To run: + +```bash +bun run index.ts +``` + +This project was created using `bun init` in bun v1.3.0. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime. diff --git a/hello_world/bun.lock b/hello_world/bun.lock new file mode 100644 index 0000000..0d36519 --- /dev/null +++ b/hello_world/bun.lock @@ -0,0 +1,29 @@ +{ + "lockfileVersion": 1, + "workspaces": { + "": { + "name": "hello_world", + "devDependencies": { + "@types/bun": "latest", + }, + "peerDependencies": { + "typescript": "^5", + }, + }, + }, + "packages": { + "@types/bun": ["@types/bun@1.3.0", "", { "dependencies": { "bun-types": "1.3.0" } }, "sha512-+lAGCYjXjip2qY375xX/scJeVRmZ5cY0wyHYyCYxNcdEXrQ4AOe3gACgd4iQ8ksOslJtW4VNxBJ8llUwc3a6AA=="], + + "@types/node": ["@types/node@24.8.1", "", { "dependencies": { "undici-types": "~7.14.0" } }, "sha512-alv65KGRadQVfVcG69MuB4IzdYVpRwMG/mq8KWOaoOdyY617P5ivaDiMCGOFDWD2sAn5Q0mR3mRtUOgm99hL9Q=="], + + "@types/react": ["@types/react@19.2.2", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-6mDvHUFSjyT2B2yeNx2nUgMxh9LtOWvkhIU3uePn2I2oyNymUAX1NIsdgviM4CH+JSrp2D2hsMvJOkxY+0wNRA=="], + + "bun-types": ["bun-types@1.3.0", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-u8X0thhx+yJ0KmkxuEo9HAtdfgCBaM/aI9K90VQcQioAmkVp3SG3FkwWGibUFz3WdXAdcsqOcbU40lK7tbHdkQ=="], + + "csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="], + + "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + + "undici-types": ["undici-types@7.14.0", "", {}, "sha512-QQiYxHuyZ9gQUIrmPo3IA+hUl4KYk8uSA7cHrcKd/l3p1OTpZcM0Tbp9x7FAtXdAYhlasd60ncPpgu6ihG6TOA=="], + } +} diff --git a/hello_world/index.ts b/hello_world/index.ts new file mode 100644 index 0000000..f67b2c6 --- /dev/null +++ b/hello_world/index.ts @@ -0,0 +1 @@ +console.log("Hello via Bun!"); \ No newline at end of file diff --git a/hello_world/package.json b/hello_world/package.json new file mode 100644 index 0000000..032a04b --- /dev/null +++ b/hello_world/package.json @@ -0,0 +1,12 @@ +{ + "name": "hello_world", + "module": "index.ts", + "type": "module", + "private": true, + "devDependencies": { + "@types/bun": "latest" + }, + "peerDependencies": { + "typescript": "^5" + } +} diff --git a/hello_world/tsconfig.json b/hello_world/tsconfig.json new file mode 100644 index 0000000..bfa0fea --- /dev/null +++ b/hello_world/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + // Environment setup & latest features + "lib": ["ESNext"], + "target": "ESNext", + "module": "Preserve", + "moduleDetection": "force", + "jsx": "react-jsx", + "allowJs": true, + + // Bundler mode + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "noEmit": true, + + // Best practices + "strict": true, + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + "noImplicitOverride": true, + + // Some stricter flags (disabled by default) + "noUnusedLocals": false, + "noUnusedParameters": false, + "noPropertyAccessFromIndexSignature": false + } +} diff --git a/single-scripts/hello_world.ts b/single-scripts/hello_world.ts new file mode 100644 index 0000000..5893f9d --- /dev/null +++ b/single-scripts/hello_world.ts @@ -0,0 +1 @@ +console.log('hello world'); \ No newline at end of file