Skip to content

Commit

Permalink
Merge pull request #264 from cyntler/add-next-js-case
Browse files Browse the repository at this point in the history
Add next js case
  • Loading branch information
cyntler authored Jun 1, 2024
2 parents 78c936f + e48ef9d commit 6fe13d9
Show file tree
Hide file tree
Showing 20 changed files with 5,048 additions and 6 deletions.
3 changes: 1 addition & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@
"prettier:fix": "prettier --write .",
"build-storybook": "storybook build",
"deploy": "npm run build-storybook && gh-pages -d storybook-static",
"release": "npm run prettier:check && npm run lint && npm run test && npm run build && release-it && npm run deploy"
"prerelease": "npm run prettier:check && npm run lint && npm run test && npm run build && cd use-cases/nextjs && npm i && npm run build",
"release": "release-it && npm run deploy"
},
"dependencies": {
"@types/mustache": "^4.2.5",
"@types/papaparse": "^5.3.14",
"ajv": "^7.2.4",
"core-js": "^3.37.1",
"mustache": "^4.2.0",
"papaparse": "^5.4.1",
"react-pdf": "^9.0.0",
Expand All @@ -68,7 +70,6 @@
"@typescript-eslint/eslint-plugin": "^7.11.0",
"@typescript-eslint/parser": "^7.11.0",
"babel-loader": "^9.1.3",
"core-js": "^3.37.1",
"eslint": "^8.57.0",
"eslint-plugin-react": "^7.34.2",
"eslint-plugin-react-hooks": "^4.6.2",
Expand Down
1 change: 1 addition & 0 deletions src/DocViewer.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "core-js/proposals/promise-with-resolvers";
import React, { CSSProperties, forwardRef, memo } from "react";
import styled, { ThemeProvider } from "styled-components";
import { HeaderBar } from "./components/HeaderBar";
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"node_modules",
"./*.ts",
"src/**/*.test.tsx",
"src/**/*.stories.tsx"
"src/**/*.stories.tsx",
"./use-cases"
]
}
3 changes: 3 additions & 0 deletions use-cases/nextjs/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
36 changes: 36 additions & 0 deletions use-cases/nextjs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
36 changes: 36 additions & 0 deletions use-cases/nextjs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
4 changes: 4 additions & 0 deletions use-cases/nextjs/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};

export default nextConfig;
Loading

0 comments on commit 6fe13d9

Please sign in to comment.