Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(config): 🔧 update better tooling with release it & other changes (…
…#132) - add [new release it](https://github.com/navin-moorthy/next-react-app/pull/132/files?diff=split#diff-a8973c793505c01e9ddd05a1e86cae50d0b94aa97bf4d4b8616b785bf00ce0f2) [changelog format](https://github.com/navin-moorthy/next-react-app/pull/132/files?diff=split#diff-1a6731e971b66d5e90b6744705335dd3d40eddc2c7be4d84958fface18ee0afc) [including commit body](https://github.com/navin-moorthy/next-react-app/pull/132/files?diff=split#diff-0b16e68584afa81cdad3d7b5f0e804951e691f8f15d48054d5985c21dc9091ee) for [better github release support](https://github.com/navin-moorthy/next-react-app/pull/132/files?diff=split#diff-bb558edcfe64dde3c4d2b8ad39e0620eba6128c3471943bb856f35192d8adc57) ```json // package.json {"release": "node release-it/getCommitsSinceLastRelease.js && release-it"} ``` - update renovate cron to run once a week on saturday ```json // .github/renovate.json {"schedule": ["after 12am and before 5am on saturday"]} ``` - remove renovate lockfile maintenance update ```json // .github/renovate.json "lockFileMaintenance": { "enabled": false }, ``` - add .prettiercache to the root folder itself & gitignore it ```json // package.json {"lint:prettier": "prettier --check --cache --cache-location=.prettiercache \"./**/*.{html,css,js,cjs,jsx,ts,cts,tsx,md,json}\""} ``` - add prettier import order with react, next & other libraries following it ```js // .prettierrc.cjs importOrder: [ // Packages. // Things that start with a letter (or digit or underscore), or `@` followed by a letter. "^react$", "^react-dom$", "^next$", "^next/+", "^@?\\w", "", // Absolute imports and other imports such as Vue-style `@/foo`. // Anything that does not start with a dot. "^../", "", "^./", "", // Relative imports. // Anything that starts with two dots. // Style imports. "^.+\\.s?css$", ], ``` - [update stylelint config](https://github.com/navin-moorthy/next-react-app/pull/132/files?diff=split#diff-5cf8e77210aa0eab867346744e9d28a14155363b32216976bd510bc9733fd9a5) for the new major version which no longer requires `stylelint-config-prettier` - add all of the local vscode settings.json to the [workspace settings.json](https://github.com/navin-moorthy/next-react-app/pull/132/files?diff=split#diff-a5de3e5871ffcc383a2294845bd3df25d3eeff6c29ad46e3a396577c413bf357) - add required [`env` check for `NEXT_PUBLIC_SITE_URL`](https://github.com/navin-moorthy/next-react-app/pull/132/files?diff=split#diff-62896e4754501eb20e5d3715cc2a262e03a7a71b9d1e3907c4dda68d01360191) which is [required for sitemap](https://github.com/navin-moorthy/next-react-app/pull/132/files?diff=split#diff-677a1e263116bbd418949c9ceb82ebc9244b5fd90f6a226c6a7b25312ec0379a) - add new image configuration for `next.config.js` ```js // next.config.js images: { formats: ["image/avif", "image/webp"], deviceSizes: [384, 640, 768, 1024, 1280, 1440, 2560], imageSizes: [128, 256], }, ``` - update `tailwind.config.cjs` for better legibility & update the html tag ```js // tailwind.config.cjs plugin(function ({ addUtilities }) { addUtilities({ ".inter-display": { "font-variation-settings": `"opsz" 32`, }, }); addUtilities({ ".optimizeLegibility": { "text-rendering": "optimizeLegibility", }, }); }), ``` ```jsx // pages/_document.tsx <Html className="min-h-full antialiased inter-display optimizeLegibility" lang="en" /> ``` - add customized `InterVar` with `Adjusted Arial Fallback` of a local font & preload our customized font. ```js // tailwind.config.cjs fontFamily: { sans: [ "InterVar", "Adjusted Arial Fallback", ...defaultTheme.fontFamily.sans, ], }, ``` ```jsx // pages/_document.tsx <Head> {/* Fonts Preload */} <link rel="preload" href="/fonts/Inter.var-english.woff2" as="font" type="font/woff2" crossOrigin="anonymous" /> </Head>; ``` - add also notes on how to add the font splitting & fallback in the `styles/global.css` file [gist lint](https://gist.githubusercontent.com/navin-moorthy/7833eaca953c4ea4d1759625354b48ba/raw/055b58b73999385a329e2043263e76f11f882467/Font%20Slicing%20with%20fallback%20for%20performance.css) - add hover media query to disable hover interaction on mobile ```js // tailwind.config.cjs future: { relativeContentPathsByDefault: true, hoverOnlyWhenSupported: true, }, ```
- Loading branch information
98efcb4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
next-react-app – ./
next-react-app-navin-moorthy.vercel.app
next-react-app-git-main-navin-moorthy.vercel.app
next-react-app-iota.vercel.app