diff --git a/README.md b/README.md index d094518..763a2e7 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,20 @@ -# A simple number converter +# Bit Calculator -Mostly written by ChatGPT. - -# create-svelte - -Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte). - -## Creating a project - -If you're seeing this, you've probably already done this step. Congrats! +Online: https://xiangpenghao.github.io/calculator/ -```bash -# create a new project in the current directory -npm create svelte@latest +A cool screen shot to bait you to click the link: +![](/dev/screenshot.png) -# create a new project in my-app -npm create svelte@latest my-app -``` -## Developing +Allows you to investigate a number in its binary, hexadecimal, and decimal forms. +Similar to the Windows calculator in programmer mode, but on Web. -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: +Could be helpful to debug memory addresses and bit-packed values, common in system programming. -```bash -npm run dev +Note that every number is **64-bit unsigned integer**, because we system programmers don't use [other types](https://www.reddit.com/r/ProgrammerHumor/comments/13gt6co/standagainstfloats/#lightbox). -# or start the server and open the app in a new browser tab -npm run dev -- --open -``` - -## Building - -To create a production version of your app: - -```bash -npm run build -``` - -You can preview the production build with `npm run preview`. +Mostly written by ChatGPT. -> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. +#### Contribution +I don't know much about web / javascript / typescript / svelte / html / css / whatever, I'm open to any contribution. +I tend to trust your modification, but please at least ask ChatGPT before sending a PR. diff --git a/dev/dev.md b/dev/dev.md new file mode 100644 index 0000000..5ce6766 --- /dev/null +++ b/dev/dev.md @@ -0,0 +1,38 @@ +# create-svelte + +Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte). + +## Creating a project + +If you're seeing this, you've probably already done this step. Congrats! + +```bash +# create a new project in the current directory +npm create svelte@latest + +# create a new project in my-app +npm create svelte@latest my-app +``` + +## Developing + +Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: + +```bash +npm run dev + +# or start the server and open the app in a new browser tab +npm run dev -- --open +``` + +## Building + +To create a production version of your app: + +```bash +npm run build +``` + +You can preview the production build with `npm run preview`. + +> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. diff --git a/dev/screenshot.png b/dev/screenshot.png new file mode 100644 index 0000000..f98c240 Binary files /dev/null and b/dev/screenshot.png differ diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 89d884c..e103869 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -174,7 +174,7 @@