Hi! I'm really excited that you are interested in contributing to Weather-app. Before submitting your contribution, please make sure to take a moment and read through the following guidelines:
- The Architectural Methodology
- Naming of Branches
- Naming of Commits
- Development Setup
- Code of Conduct
- Issue Reporting Guidelines
In this App use the FSD Architectural methodology.
In git you can create folders and subfolders. Just add / in the branch name and your branch will get the following folder/name structure. This feature helps sort branches in git.
build
changes regarding the build process (npm, vite)chore
changes that do not directly affect the code, something that the end user will not see (installing/removing dependencies, setting up a project/tools)ci
changes regarding CI/CDdocs
changes regarding documentationfeat
new featurefix
bug fixperf
performance improvementsrefactor
code refactoringrevert
commit cancelstyle
style changestest
adding missing tests or correcting existing tests
Examples:
feat/DEV-666-add-custom-input
fix/DEV-1125-issue-with-user-avatar-dimensions
chore/DEV-25-upgrade-vite-version
style/add-outline-to-primary-button
Logical code codes are easy to sort, and selecting a commit type becomes a trivial group. You have added a new function - this is the type feat. Fixed a bug - this is a type of correction. We refactored the code without changing the main logic of the work - this is a type of refactoring. Etc.
After adding the commit type, you put :, a space, and write a short generic name of what exactly you did. The message itself should be written in the imperative mood, begin, as a rule, with a verb (“add”, “remove”, “correct”, “change”, etc.) and not contain any punctuation at the end.
Examples:
feat: add booking widget to product page
refactor: remove info button in tariff card
ci: update CI/CD for performance reason
If you want to describe in detail the work done, then create a large commit message with a header, message body and footer (optional). The git commit command will help you with this, which opens the code editor built into the command line shell (vim, nano, etc.). You can also use the GUI option in your IDE.
Examples:
# HEADING
feat: add button for loading new posts
# BODY
Add a button for loading new posts on blog page. It can be hidden if there're no more info and shown if it exists.
There is a small delay on button hidding(maybe it's a problem with rerendering), so it needs to be fixed on future refactoring.
# FOOTER(optional)
Signed-of-by: John Doe
Issue: DEV-123
You will need Node.js version 21.6.11+, and NPM version 10.3.0+.
A high level overview of tools used:
- TypeScript as the development language
- Vite for development bundling
- Vitest for unit testing
- Prettier for code formatting
- ESLint for static error prevention (outside of types)
Create file .env in this poject (no in src directory)
Put your API key from OpenWeather to VITE_WEATHER_SECRET_API_KEY in .env file of this project.
Example
VITE_WEATHER_SECRET_API_KEY = 12345
prefix VITE_ is required for expose as import.meta.env.VITE_WEATHER_SECRET_API_KEY
Your .env file must be added to your .gitignore file
Install dependencies
npm install
Run the App
npm run dev
Default port
http://localhost:5173/
Unit test with Vitest
npm run test
in vite.config.ts added settings for autodelete all console.log() before your production.
esbuild: {
drop: ['console', 'debugger'],
},
name: Bug report about: Create a report to help us improve title: '' labels: '' assignees: ''
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
name: Feature request about: Suggest an idea for this project title: '' labels: '' assignees: ''
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like A clear and concise description of what you want to happen.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!