Skip to content

Commit

Permalink
docs(readme): πŸ“ update development info
Browse files Browse the repository at this point in the history
  • Loading branch information
krsiakdaniel committed Dec 25, 2024
1 parent e642cda commit ddff5b4
Showing 1 changed file with 74 additions and 7 deletions.
81 changes: 74 additions & 7 deletions README-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ Development environment for the project.
- [Development](#development)
- [πŸ’» Commands](#-commands)
- [Install dependencies](#install-dependencies)
- [Update outdated dependencies](#update-outdated-dependencies)
- [Manually](#manually)
- [Using `npm-check-updates` tool](#using-npm-check-updates-tool)
- [Update outdated dependencies](#update-outdated-dependencies)
- [Manually](#manually)
- [Using tool `npm-check-updates`](#using-tool-npm-check-updates)
- [πŸ’… Prettier](#-prettier)
- [Imports Sorting Order](#imports-sorting-order)
- [Import Example](#import-example)

---

Expand All @@ -34,21 +36,21 @@ npm run dev

Open [http://localhost:3000](http://localhost:3000) to view project in browser.

### Update outdated dependencies
## Update outdated dependencies

There are 2 ways to do this.

#### Manually
### Manually

Find what packages are outdated and upgrade to latest version if possible.

```bash
npm outdated
```

#### Using `npm-check-updates` tool
### Using tool `npm-check-updates`

To update the outdated packages in package.json, you can use the [npm-check-updates](https://www.npmjs.com/package/npm-check-updates) (ncu) tool.
To update the outdated packages in package.json, you can use the NCU tool: [npm-check-updates](https://www.npmjs.com/package/npm-check-updates)

Install `npm-check-updates` globally.

Expand Down Expand Up @@ -93,3 +95,68 @@ Format the code via Prettier.
```bash
npm run prettier:fix
```

## Imports Sorting Order

Sorting order for imports in files:

1. Third-Party Library Imports
2. Custom Hooks
3. Components
4. Data
5. Utils
6. Interfaces and Helpers
7. Images
8. CSS

## Import Example

```ts
// Third-Party Library Imports
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import { ReactNode } from 'react'
```

```ts
// Custom Hooks
import { useScrollProgress } from '@/hooks/useScrollProgress'
```

```ts
// Components
import PageContainer from '@/components/layout/PageContainer'
import PageNavigation from '@/components/page-navigation/PageNavigation'
import Header from '@/components/header/Header'
import Footer from '@/components/footer/Footer'
```

```ts
// Data
import { mindset } from '@/data/expertise/mindset'
import { iconsSkills1 } from '@/data/skills/skillsMain'
```

```ts
// Utils
import { TEXT } from '@/localization/english'
import { DATA_TEST_IDS } from '@/utils/constants/ids/dataTestIds'
import { PAGES_URL } from '@/utils/constants/urls/pageUrls'
```

```ts
// Interfaces and Helpers
import { getGoBackLinkID } from '@/utils/helpers/getGoBackLink'
import { HeaderSectionProps } from '@/utils/interfaces/componentProps'
import { NavigationDirectionEnum } from '@/utils/interfaces/enums'
```

```ts
// Images
import logo from '@/public/images/webp/logo.webp'
```

```ts
// CSS
import '@/app/custom.css'
```

0 comments on commit ddff5b4

Please sign in to comment.