diff --git a/.github/workflows/update-deps.yml b/.github/workflows/update-deps.yml index 9b99139..cc3deb4 100644 --- a/.github/workflows/update-deps.yml +++ b/.github/workflows/update-deps.yml @@ -9,7 +9,7 @@ jobs: update: strategy: matrix: - node-version: [18.x] + node-version: [20.x] name: Update all dependencies runs-on: ubuntu-latest @@ -23,8 +23,8 @@ jobs: cache: 'yarn' - run: yarn --frozen-lockfile - - run: yarn upgrade-interactive --latest - - run: rm -Rf node_modules package-lock.json + - run: yarn upgrade --latest + - run: rm -Rf node_modules yarn-lock.json - run: yarn - name: Create Pull Request uses: peter-evans/create-pull-request@v4 diff --git a/package.json b/package.json index 538db33..4ce0108 100644 --- a/package.json +++ b/package.json @@ -1,71 +1,72 @@ { "name": "setting-up-next", - "version": "1.3.5", + "version": "1.5.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", + "clean": "rimraf .next .swc out coverage", "lint": "next lint", "format": "next lint --fix && prettier '**/*.{json,yaml}' --write --ignore-path .gitignore", "check-types": "tsc --noEmit --pretty", "test": "jest", "commit": "cz", - "prepare": "husky install", - "postbuild": "next-sitemap", "storybook": "storybook dev -p 6006", - "storybook:build": "storybook build" + "storybook:build": "storybook build", + "prepare": "husky install", + "postbuild": "next-sitemap" }, "dependencies": { "@headlessui/react": "^1.7.17", - "@heroicons/react": "^2.0.18", + "@heroicons/react": "^2.1.1", "@hookform/resolvers": "^3.3.2", "@t3-oss/env-nextjs": "^0.7.1", - "next": "14.0.3", + "next": "14.0.4", "next-seo": "^6.4.0", "next-sitemap": "^4.2.3", "react": "^18", "react-dom": "^18", - "react-hook-form": "^7.48.2", + "react-hook-form": "^7.49.2", "zod": "^3.22.4" }, "devDependencies": { "@commitlint/cli": "^18.4.3", "@commitlint/config-conventional": "^18.4.3", "@commitlint/cz-commitlint": "^18.4.3", - "@next/bundle-analyzer": "^14.0.3", - "@storybook/addon-essentials": "^7.6.4", - "@storybook/addon-interactions": "^7.6.4", - "@storybook/addon-links": "^7.6.4", + "@next/bundle-analyzer": "^14.0.4", + "@storybook/addon-essentials": "^7.6.6", + "@storybook/addon-interactions": "^7.6.6", + "@storybook/addon-links": "^7.6.6", "@storybook/addon-onboarding": "^1.0.10", - "@storybook/blocks": "^7.6.4", - "@storybook/nextjs": "^7.6.4", - "@storybook/react": "^7.6.4", - "@storybook/test": "^7.6.4", + "@storybook/blocks": "^7.6.6", + "@storybook/nextjs": "^7.6.6", + "@storybook/react": "^7.6.6", + "@storybook/test": "^7.6.6", "@storybook/testing-library": "^0.2.2", "@testing-library/jest-dom": "^6.1.5", "@testing-library/react": "^14.1.2", "@types/jest": "^29.5.11", - "@types/node": "^20", - "@types/react": "^18", - "@types/react-dom": "^18", - "@typescript-eslint/eslint-plugin": "^6.13.1", - "@typescript-eslint/parser": "^6.13.2", + "@types/node": "^20.10.5", + "@types/react": "^18.2.45", + "@types/react-dom": "^18.2.18", + "@typescript-eslint/eslint-plugin": "^6.15.0", + "@typescript-eslint/parser": "^6.15.0", "autoprefixer": "^10.0.1", "commitizen": "^4.3.0", - "cssnano": "^6.0.1", - "eslint": "^8.55.0", + "cssnano": "^6.0.2", + "eslint": "^8.56.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-typescript": "^17.1.0", - "eslint-config-next": "^14.0.3", + "eslint-config-next": "^14.0.4", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-import": "^2.29.0", + "eslint-plugin-import": "^2.29.1", "eslint-plugin-jest": "^27.6.0", "eslint-plugin-jest-dom": "^5.1.0", "eslint-plugin-jest-formatting": "^3.1.0", "eslint-plugin-jsx-a11y": "^6.8.0", - "eslint-plugin-playwright": "^0.19.0", - "eslint-plugin-prettier": "^5.0.1", + "eslint-plugin-playwright": "^0.20.0", + "eslint-plugin-prettier": "^5.1.1", "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-simple-import-sort": "^10.0.0", @@ -76,13 +77,13 @@ "husky": "^8.0.3", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", - "lint-staged": "^15.1.0", + "lint-staged": "^15.2.0", "postcss": "^8", - "prettier": "^3.1.0", - "semantic-release": "^22.0.8", - "storybook": "^7.6.4", - "tailwindcss": "^3.3.0", - "typescript": "^5" + "prettier": "^3.1.1", + "semantic-release": "^22.0.12", + "storybook": "^7.6.6", + "tailwindcss": "^3.4.0", + "typescript": "^5.3.3" }, "config": { "commitizen": { diff --git a/src/components/NextLinkBox.stories.tsx b/src/components/NextLinkBox.stories.tsx index 0266150..2c24097 100644 --- a/src/components/NextLinkBox.stories.tsx +++ b/src/components/NextLinkBox.stories.tsx @@ -3,11 +3,11 @@ import type { Meta, StoryObj } from '@storybook/react'; import { NextLinkBox } from './NextLinkBox'; const meta = { - title: 'Example/NextLinkBox', + title: 'Example/components/NextLinkBox', component: NextLinkBox, tags: ['autodocs'], parameters: { - layout: 'fullscreen', + layout: 'center', }, } satisfies Meta; diff --git a/src/templates/DefaultSection.tsx b/src/layouts/DefaultSection.tsx similarity index 100% rename from src/templates/DefaultSection.tsx rename to src/layouts/DefaultSection.tsx diff --git a/src/layouts/Meta.test.tsx b/src/layouts/Meta.test.tsx index c2ccffd..659121c 100644 --- a/src/layouts/Meta.test.tsx +++ b/src/layouts/Meta.test.tsx @@ -7,7 +7,6 @@ jest.mock( 'next/head', () => function Head(props: { children: ReactNode }) { - // eslint-disable-next-line testing-library/no-node-access return props.children; }, ); diff --git a/src/layouts/index.ts b/src/layouts/index.ts new file mode 100644 index 0000000..5859f34 --- /dev/null +++ b/src/layouts/index.ts @@ -0,0 +1,4 @@ +import { DefaultSection } from './DefaultSection'; +import { Meta } from './Meta'; + +export { DefaultSection, Meta }; diff --git a/src/pages/about.tsx b/src/pages/about.tsx index 9f5ee75..9336737 100644 --- a/src/pages/about.tsx +++ b/src/pages/about.tsx @@ -1,8 +1,8 @@ import Image from 'next/image'; import { NextLinkBox } from '@/components'; -import { Meta } from '@/layouts/Meta'; -import { DefaultSection, Main } from '@/templates'; +import { DefaultSection, Meta } from '@/layouts'; +import { Main } from '@/templates'; const linkBoxData = [ { @@ -38,10 +38,8 @@ const About = () => ( } > -
-

- This Project is built with -

+
+

Built with

( })}
+ +
    +
  • + Packages Used +
  • +
  • + πŸ”₯ Type checking{' '} + + TypeScript + +
  • +
  • + πŸ’Ž Integrate with{' '} + + Tailwind CSS + +
  • +
  • βœ… Strict Mode for TypeScript and React 18
  • +
  • ♻️ Type-safe environment variables with T3 Env
  • +
  • ⌨️ Form with React Hook Form
  • +
  • + πŸ“ Linter with{' '} + + ESLint + {' '} + (default NextJS, NextJS Core Web Vitals, Tailwind CSS and Airbnb + configuration) +
  • +
  • + πŸ’– Code Formatter with{' '} + + Prettier + +
  • +
  • 🦊 Husky for Git Hooks
  • +
  • 🚫 Lint-staged for running linters on Git staged files
  • +
  • + πŸš“ Lint git commit with{' '} + + Commitlint + +
  • +
  • πŸ““ Write standard compliant commit messages with Commitizen
  • +
  • 🦺 Unit Testing with Jest and React Testing Library
  • +
  • πŸ‘· Run tests on pull request with GitHub Actions
  • +
  • + πŸŽ‰{' '} + + Storybook + {' '} + for UI development +
  • +
  • 🎁 Automatic changelog generation with Semantic Release
  • +
  • πŸ’‘ Absolute Imports using `@` prefix
  • +
  • πŸ€– SEO metadata, JSON-LD and Open Graph tags with Next SEO
  • +
  • πŸ—ΊοΈ Sitemap.xml and robots.txt with next-sitemap
  • +
  • + Built-in feature from Next.js +
  • +
  • β˜• Minify HTML & CSS
  • +
  • πŸ’¨ Live reload
  • +
  • βœ… Cache busting
  • +
+
); diff --git a/src/pages/index.tsx b/src/pages/index.tsx index ba2e75a..4f0d6cb 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,5 +1,5 @@ -import { Meta } from '@/layouts/Meta'; -import { DefaultSection, Main } from '@/templates'; +import { DefaultSection, Meta } from '@/layouts'; +import { Main } from '@/templates'; const Index = () => (
{ + return ( +
}> + +

Portfolios

+
+
+ ); +}; + +export default Portfolio; diff --git a/src/templates/Main.stories.tsx b/src/templates/Main.stories.tsx index 56b4383..2f48b1d 100644 --- a/src/templates/Main.stories.tsx +++ b/src/templates/Main.stories.tsx @@ -5,7 +5,7 @@ import { Main } from './Main'; // More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction const meta = { - title: 'Example/Main', + title: 'Example/templates/Main', component: Main, tags: ['autodocs'], parameters: { diff --git a/src/templates/Main.tsx b/src/templates/Main.tsx index d0bbb81..dca9773 100644 --- a/src/templates/Main.tsx +++ b/src/templates/Main.tsx @@ -13,8 +13,8 @@ type IMainProps = { }; const menuData = [ - { id: 'about', name: 'about', path: '/about' }, - { id: 'item1', name: 'item1', path: '/item1' }, + { id: 'about', name: 'About', path: '/about' }, + { id: 'portfolio', name: 'Portfolio', path: '/portfolio' }, { id: 'item2', name: 'item2', path: '/item2' }, ]; @@ -27,9 +27,9 @@ const Main = (props: IMainProps) => { {props.meta}
-
+
-

+

{AppConfig.title}

-