Skip to content

Commit 8e847be

Browse files
committed
created typescript project
1 parent 80ff4a6 commit 8e847be

File tree

142 files changed

+12653
-1634
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+12653
-1634
lines changed

docs/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

docs/README.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Bikram Sambat Calendar
2+
3+
A modern React + TypeScript web application for converting and viewing Nepali (Bikram Sambat) and Gregorian dates, with tithi calculation, event/holiday display, and a beautiful calendar UI.
4+
5+
## Features
6+
7+
- Convert between Bikram Sambat (BS) and Gregorian (AD) dates
8+
- View Nepali and English months, days, and years
9+
- Calculate lunar tithi for any date
10+
- See major Nepali festivals and holidays
11+
- Responsive, accessible, and print-friendly calendar UI
12+
- Toggle between Nepali and English language
13+
- "Show in Calendar" and event modal support
14+
- Built with [Vite](https://vitejs.dev/), [React](https://react.dev/), [Tailwind CSS](https://tailwindcss.com/), and [shadcn/ui](https://ui.shadcn.com/)
15+
16+
## Getting Started
17+
18+
### Prerequisites
19+
20+
- [Node.js](https://nodejs.org/) (v18+ recommended)
21+
- [Yarn](https://yarnpkg.com/) or [npm](https://www.npmjs.com/)
22+
23+
### Installation
24+
25+
```sh
26+
git clone https://github.com/yourusername/nepdate.git
27+
cd nepdate
28+
yarn install
29+
# or
30+
npm install
31+
```
32+
33+
### Development
34+
35+
Start the local development server:
36+
37+
```sh
38+
yarn dev
39+
# or
40+
npm run dev
41+
```
42+
43+
Open [http://localhost:8080](http://localhost:8080) in your browser.
44+
45+
> **Note:** If you encounter a "too many open files" error, you may need to increase your system's file watch limit. See [this StackOverflow answer](https://stackoverflow.com/questions/53930305/nodemon-error-system-limit-for-number-of-file-watchers-reached) for help.
46+
47+
### Local Production Build
48+
49+
Build and preview locally:
50+
51+
```sh
52+
yarn build
53+
yarn preview
54+
# or
55+
npm run build
56+
npm run preview
57+
```
58+
59+
This will output the production build to the `dist/` directory, which is **not pushed to GitHub**.
60+
61+
### Build for GitHub Pages
62+
63+
To build for GitHub Pages (output to `docs/` and set correct base path):
64+
65+
```sh
66+
yarn build-gh
67+
# or
68+
npm run build-gh
69+
```
70+
71+
Preview the GitHub Pages build locally:
72+
73+
```sh
74+
yarn preview-gh
75+
# or
76+
npm run preview-gh
77+
```
78+
79+
This will output the production build to the `docs/` directory, which **should be committed and pushed** to your repository for GitHub Pages deployment.
80+
81+
### Deploy to GitHub Pages
82+
83+
1. Commit and push the `docs` folder to your repository.
84+
2. In your repository settings, set GitHub Pages to serve from the `docs` folder on the `main` branch.
85+
3. Your site will be available at `https://<username>.github.io/nepdate/`.
86+
87+
## Project Structure
88+
89+
```
90+
├── bikram-calendar/ # Bikram Sambat calendar calculation library
91+
├── src/ # React app source code
92+
│ ├── components/ # React components
93+
│ ├── data/ # Event and holiday data
94+
│ ├── hooks/ # Custom React hooks
95+
│ ├── utils/ # Utility functions
96+
│ └── index.css # Main CSS (Tailwind)
97+
├── docs/ # Production build output for GitHub Pages (should be pushed)
98+
├── dist/ # Production build output for local preview (not pushed)
99+
├── index.html # Main HTML entry
100+
├── package.json
101+
├── postcss.config.js
102+
├── tailwind.config.ts
103+
└── vite.config.ts
104+
```
105+
106+
## Scripts
107+
108+
| Command | Description |
109+
|-----------------|---------------------------------------------|
110+
| `dev` | Start local dev server |
111+
| `build` | Build for local production (`dist/`) |
112+
| `preview` | Preview local production build |
113+
| `build-gh` | Build for GitHub Pages (`docs/`) |
114+
| `preview-gh` | Preview GitHub Pages build |
115+
| `lint` | Run ESLint |
116+
117+
## Notes on Build Outputs
118+
119+
- The `dist/` directory is for local production builds and **should not be pushed to Git**.
120+
- The `docs/` directory is for GitHub Pages deployment and **should be committed and pushed**.
121+
122+
## License
123+
124+
This project is licensed under the [GPL v3 or later](https://www.gnu.org/licenses/gpl-3.0.en.html).
125+
126+
---
127+
128+
**Made with love by Khumnath.**

docs/assets/amawasya.png

-1.94 KB
Binary file not shown.

docs/assets/favicon.png

-7.32 KB
Binary file not shown.

docs/assets/purnima.png

-2.78 KB
Binary file not shown.

0 commit comments

Comments
 (0)