From 4739acb563ba13401fc98a84ebf2a3a19acf429c Mon Sep 17 00:00:00 2001 From: guidari Date: Wed, 23 Aug 2023 16:37:25 -0300 Subject: [PATCH] chore: fixed package.json and readme --- README.md | 22 +++++++------------- package.json | 58 +++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 62 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index c2db3002ebd2..f60487f9586d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,11 @@ -# Carbon Tutorial for NextJS 13 +# Step 1 + +## Carbon Tutorial for NextJS 13 + Base NextJS 13 app using IBM Carbon Design System React components ## Create NextJS 13 app + ```bash yarn create next-app @@ -16,7 +20,9 @@ yarn create next-app cd carbon-tutorial-next yarn dev ``` + Configure paths in `jsconfig.json` + ``` { "compilerOptions": { @@ -28,17 +34,3 @@ Configure paths in `jsconfig.json` } } ``` - -## Update the NextJS Bootstrap -Modify some of the boostrap code in order to support the Carbon components. - -In `app/layout.js` (RootLayout) take out: -``` -import { Inter } from 'next/font/google' -const inter = Inter({ subsets: ['latin'] }) -``` -Take out className tag from and update the meta data. - -Then `yarn dev` to confirm. - - diff --git a/package.json b/package.json index d6c2b8182041..d26b4b467774 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,70 @@ { - "name": "carbon-tutorial-next", + "name": "carbon-tutorial-nextjs", "version": "0.1.0", "private": true, + "repository": "git@github.com:carbon-design-system/carbon-tutorial-nextjs.git", + "bugs": "https://github.com/carbon-design-system/carbon-tutorial-nextjs/issues", + "license": "Apache-2.0", "scripts": { - "dev": "next dev", "build": "next build", + "dev": "next dev", "start": "next start", - "lint": "next lint" + "lint": "next lint", + "ci-check": "yarn format:diff", + "clean": "yarn cache clean && yarn install", + "format": "prettier --write \"**/*.{js,md,scss}\"", + "format:diff": "prettier --list-different \"**/*.{js,md,scss}\"" }, "dependencies": { + "@carbon/react": "^1.35.0", "eslint": "8.44.0", "eslint-config-next": "13.4.9", "next": "13.4.9", "react": "18.2.0", "react-dom": "18.2.0" + }, + "devDependencies": { + "@commitlint/cli": "7.5.2", + "@commitlint/config-conventional": "7.5.0", + "husky": "1.3.1", + "lint-staged": "8.1.5", + "prettier": "^2.8.8" + }, + "browserslist": [ + ">0.2%", + "not dead", + "not ie <= 11", + "not op_mini all" + ], + "husky": { + "hooks": { + "commit-msg": "commitlint -e $HUSKY_GIT_PARAMS", + "pre-commit": "lint-staged" + } + }, + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "lint-staged": { + "*.js": [ + "prettier --cache --write", + "git add" + ], + "*.{scss,css}": [ + "prettier --cache --write", + "git add" + ], + "*.md": [ + "prettier --cache --write", + "git add" + ] + }, + "prettier": { + "jsxBracketSameLine": true, + "printWidth": 80, + "singleQuote": true, + "trailingComma": "es5" } }