Skip to content

Commit

Permalink
Merge pull request carbon-design-system#2 from guidari/v11-next-step-1
Browse files Browse the repository at this point in the history
chore: fixed package.json and readme
  • Loading branch information
guidari authored Aug 23, 2023
2 parents c8ceed3 + 4739acb commit 5a5137d
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 18 deletions.
22 changes: 7 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -16,7 +20,9 @@ yarn create next-app
cd carbon-tutorial-next
yarn dev
```

Configure paths in `jsconfig.json`

```
{
"compilerOptions": {
Expand All @@ -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 <body> and update the meta data.

Then `yarn dev` to confirm.


58 changes: 55 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,70 @@
{
"name": "carbon-tutorial-next",
"name": "carbon-tutorial-nextjs",
"version": "0.1.0",
"private": true,
"repository": "[email protected]: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"
}
}

0 comments on commit 5a5137d

Please sign in to comment.