mirror of
https://github.com/Snigdha-OS/snigdhaos-tools.git
synced 2025-09-04 01:46:37 +02:00
🧹 chore: v3.1
This commit is contained in:
142
README.md
Normal file
142
README.md
Normal file
@@ -0,0 +1,142 @@
|
||||
### SnigdhaOS Tools
|
||||
|
||||
Welcome to the **SnigdhaOS Tools** repository! This project is a collection of web-based utilities aimed at enhancing productivity and providing solutions for various common tasks. It is built with modern web technologies for speed, scalability, and ease of use.
|
||||
|
||||
|
||||
|
||||
### 📦 Features
|
||||
|
||||
- **User-Friendly Interface**: Intuitive and responsive UI built with React and TypeScript.
|
||||
- **Custom Tools**: A growing collection of utilities designed to solve everyday problems.
|
||||
- **Optimized Build**: Powered by Vite for ultra-fast development and production workflows.
|
||||
- **TailwindCSS Styling**: Modern and customizable design system for beautiful interfaces.
|
||||
- **Deployable to GitHub Pages**: Easy deployment for public access and sharing.
|
||||
- **Cross-Platform Support**: Works seamlessly on desktop, mobile, and tablet devices.
|
||||
|
||||
|
||||
|
||||
### 📂 Repository Structure
|
||||
|
||||
The repository follows a structured and organized layout for ease of development and scalability:
|
||||
|
||||
```
|
||||
snigdhaos-tools/
|
||||
├── public/ # Static assets (e.g., favicon, index.html)
|
||||
├── src/ # Source code
|
||||
│ ├── assets/ # Images, icons, and other static files
|
||||
│ ├── components/ # Reusable React components
|
||||
│ ├── pages/ # Individual pages of the application
|
||||
│ ├── styles/ # Global and component-specific styles
|
||||
│ ├── utils/ # Utility functions and helpers
|
||||
│ ├── App.tsx # Root application component
|
||||
│ ├── main.tsx # Entry point for React and Vite
|
||||
│ └── vite-env.d.ts # TypeScript definitions for Vite
|
||||
├── dist/ # Production build output (generated after build)
|
||||
├── .eslintrc.js # ESLint configuration
|
||||
├── tailwind.config.js # TailwindCSS configuration
|
||||
├── tsconfig.json # TypeScript configuration
|
||||
├── vite.config.js # Vite configuration
|
||||
├── package.json # Project metadata and dependencies
|
||||
├── pnpm-lock.yaml # Dependency lock file for pnpm
|
||||
└── README.md # Project documentation
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 🚀 Getting Started
|
||||
|
||||
#### Prerequisites
|
||||
Make sure you have the following installed:
|
||||
- **Node.js** (16.x or later)
|
||||
- **pnpm** (Preferred package manager)
|
||||
|
||||
#### Installation
|
||||
1. Clone the repository:
|
||||
```bash
|
||||
git clone https://github.com/Snigdha-OS/snigdhaos-tools.git
|
||||
cd snigdhaos-tools
|
||||
```
|
||||
2. Install dependencies:
|
||||
```bash
|
||||
pnpm install
|
||||
```
|
||||
|
||||
#### Running the Development Server
|
||||
Start the development server with:
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
The application will be served at `http://localhost:5173` and automatically open in your default browser.
|
||||
|
||||
#### Building for Production
|
||||
To generate a production-ready build, run:
|
||||
```bash
|
||||
pnpm build
|
||||
```
|
||||
The build artifacts will be output to the `dist` directory.
|
||||
|
||||
|
||||
|
||||
### 🌐 Deployment on GitHub Pages
|
||||
|
||||
1. **Configure Vite**:
|
||||
Ensure the `base` path in `vite.config.js` matches your repository name:
|
||||
```javascript
|
||||
base: '/snigdhaos-tools/',
|
||||
```
|
||||
2. **Deploy**:
|
||||
Run the deployment script:
|
||||
```bash
|
||||
pnpm run deploy
|
||||
```
|
||||
3. **Verify**:
|
||||
Your app will be deployed at:
|
||||
```
|
||||
https://Snigdha-OS.github.io/snigdhaos-tools/
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 🛠️ Technologies Used
|
||||
|
||||
- **React**: Component-based UI library.
|
||||
- **TypeScript**: Type-safe JavaScript.
|
||||
- **Vite**: Modern frontend build tool.
|
||||
- **TailwindCSS**: Utility-first CSS framework.
|
||||
- **pnpm**: Fast, efficient package manager.
|
||||
- **gh-pages**: GitHub Pages deployment.
|
||||
|
||||
|
||||
|
||||
### 🤝 Contributing
|
||||
|
||||
We welcome contributions to improve **SnigdhaOS Tools**! Follow these steps to contribute:
|
||||
|
||||
1. Fork the repository.
|
||||
2. Create a new branch:
|
||||
```bash
|
||||
git checkout -b feature-name
|
||||
```
|
||||
3. Make your changes and commit:
|
||||
```bash
|
||||
git commit -m "Add feature-name"
|
||||
```
|
||||
4. Push to your branch:
|
||||
```bash
|
||||
git push origin feature-name
|
||||
```
|
||||
5. Open a pull request and describe your changes.
|
||||
|
||||
|
||||
|
||||
### 📜 License
|
||||
|
||||
This project is licensed under the [MIT License](LICENSE). Feel free to use, modify, and distribute it as per the license terms.
|
||||
|
||||
|
||||
|
||||
### 🙌 Acknowledgments
|
||||
|
||||
Thanks for using **SnigdhaOS Tools**! If you find it helpful, please give the repository a ⭐. Feedback and suggestions are highly encouraged to help improve this project.
|
||||
|
||||
Happy coding! 🎉
|
97
push.sh
97
push.sh
@@ -22,61 +22,62 @@ branch=$(git rev-parse --abbrev-ref HEAD)
|
||||
echo "Pulling latest changes from remote branch '$branch'..."
|
||||
git pull origin "$branch" || error_exit "Failed to pull changes from the remote repository. Please resolve any conflicts manually."
|
||||
|
||||
# Check if there are any changes to commit (both staged and unstaged)
|
||||
if git diff --quiet && git diff --cached --quiet; then
|
||||
error_exit "No changes detected to commit." # If no changes, exit the script
|
||||
fi
|
||||
# Stage all changes (tracked and untracked)
|
||||
echo "Staging all changes..."
|
||||
git add -A || error_exit "Failed to stage changes."
|
||||
|
||||
# Prompt the user to select a commit type from the predefined list of types
|
||||
echo "Select a commit type:"
|
||||
select type in "${TYPES[@]}"; do
|
||||
if [[ -n "$type" ]]; then # If a valid selection is made, break the loop
|
||||
break
|
||||
else
|
||||
echo "Invalid selection. Please try again." # If invalid, prompt again
|
||||
# Check if there are any staged changes to commit
|
||||
if ! git diff --cached --quiet; then
|
||||
# Prompt the user to select a commit type from the predefined list of types
|
||||
echo "Select a commit type:"
|
||||
select type in "${TYPES[@]}"; do
|
||||
if [[ -n "$type" ]]; then # If a valid selection is made, break the loop
|
||||
break
|
||||
else
|
||||
echo "Invalid selection. Please try again." # If invalid, prompt again
|
||||
fi
|
||||
done
|
||||
|
||||
# Extract the commit type (e.g., "feat") and emoji (e.g., "🚀") from the selected type
|
||||
type_emoji=${type} # The full emoji and type (e.g., "🚀 feat")
|
||||
type=${type_emoji#* } # Extract the commit type (e.g., "feat") by removing the emoji
|
||||
emoji=${type_emoji% *} # Extract the emoji (e.g., "🚀") by removing the type
|
||||
|
||||
# Prompt the user to enter a short description for the commit
|
||||
read -p "Enter a short description: " desc
|
||||
if [ -z "$desc" ]; then # If the description is empty, exit with an error
|
||||
error_exit "A short description is required!"
|
||||
fi
|
||||
done
|
||||
|
||||
# Extract the commit type (e.g., "feat") and emoji (e.g., "🚀") from the selected type
|
||||
type_emoji=${type} # The full emoji and type (e.g., "🚀 feat")
|
||||
type=${type_emoji#* } # Extract the commit type (e.g., "feat") by removing the emoji
|
||||
emoji=${type_emoji% *} # Extract the emoji (e.g., "🚀") by removing the type
|
||||
# Prompt the user to enter a longer description (optional)
|
||||
read -p "Enter a longer description (optional): " long_desc
|
||||
|
||||
# Prompt the user to enter a short description for the commit
|
||||
read -p "Enter a short description: " desc
|
||||
if [ -z "$desc" ]; then # If the description is empty, exit with an error
|
||||
error_exit "A short description is required!"
|
||||
fi
|
||||
# Create the commit message using the emoji, type, and description
|
||||
commit_msg="$emoji $type: $desc"
|
||||
|
||||
# Prompt the user to enter a longer description (optional)
|
||||
read -p "Enter a longer description (optional): " long_desc
|
||||
# If the user provided a longer description, append it to the commit message
|
||||
if [ -n "$long_desc" ]; then
|
||||
commit_msg+="\n\n$long_desc" # Adds the longer description to the commit message
|
||||
fi
|
||||
|
||||
# Create the commit message using the emoji, type, and description
|
||||
commit_msg="$emoji $type: $desc"
|
||||
# Print the commit message to the console for review
|
||||
echo -e "\nCommit message:"
|
||||
echo -e "\033[1;36m$commit_msg\033[0m" # Prints the commit message in cyan color
|
||||
|
||||
# If the user provided a longer description, append it to the commit message
|
||||
if [ -n "$long_desc" ]; then
|
||||
commit_msg+="\n\n$long_desc" # Adds the longer description to the commit message
|
||||
fi
|
||||
# Commit the changes with the constructed commit message
|
||||
if git commit -m "$commit_msg"; then
|
||||
echo -e "\033[1;32mCommit successful!\033[0m" # If commit is successful, print success message in green
|
||||
else
|
||||
error_exit "Commit failed. Please check your changes and try again." # If commit fails, show error and exit
|
||||
fi
|
||||
|
||||
# Print the commit message to the console for review
|
||||
echo -e "\nCommit message:"
|
||||
echo -e "\033[1;36m$commit_msg\033[0m" # Prints the commit message in cyan color
|
||||
|
||||
# Stage all changes for commit
|
||||
git add .
|
||||
|
||||
# Commit the changes with the constructed commit message
|
||||
if git commit -m "$commit_msg"; then
|
||||
echo -e "\033[1;32mCommit successful!\033[0m" # If commit is successful, print success message in green
|
||||
# Push the changes to the remote repository
|
||||
echo "Pushing changes to remote branch '$branch'..."
|
||||
if git push origin "$branch"; then
|
||||
echo -e "\033[1;32mChanges pushed to remote branch '$branch'.\033[0m" # If push is successful, print success message in green
|
||||
else
|
||||
error_exit "Push failed. Please check your connection or branch permissions." # If push fails, show error and exit
|
||||
fi
|
||||
else
|
||||
error_exit "Commit failed. Please check your changes and try again." # If commit fails, show error and exit
|
||||
error_exit "No changes detected to commit." # If no changes are staged, exit
|
||||
fi
|
||||
|
||||
# Push the changes to the remote repository
|
||||
echo "Pushing changes to remote branch '$branch'..."
|
||||
if git push origin "$branch"; then
|
||||
echo -e "\033[1;32mChanges pushed to remote branch '$branch'.\033[0m" # If push is successful, print success message in green
|
||||
else
|
||||
error_exit "Push failed. Please check your connection or branch permissions." # If push fails, show error and exit
|
||||
fi
|
Reference in New Issue
Block a user