Skip to content

Commit

Permalink
feat: example app
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasngf committed Apr 21, 2022
1 parent 101f8c4 commit df99d56
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/example-next/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("config/eslint-preset");
30 changes: 30 additions & 0 deletions examples/example-next/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Getting Started

First, run the development server:

```bash
yarn dev
```

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

You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

## 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_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
5 changes: 5 additions & 0 deletions examples/example-next/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
5 changes: 5 additions & 0 deletions examples/example-next/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const withTM = require("next-transpile-modules")(["ui"]);

module.exports = withTM({
reactStrictMode: true,
});
26 changes: 26 additions & 0 deletions examples/example-next/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "web",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"next": "12.0.8",
"react": "17.0.2",
"react-dom": "17.0.2",
"ui": "workspace:*"
},
"devDependencies": {
"config": "workspace:*",
"eslint": "7.32.0",
"next-transpile-modules": "9.0.0",
"tsconfig": "workspace:*",
"@types/node": "^17.0.12",
"@types/react": "17.0.37",
"typescript": "^4.5.3"
}
}
10 changes: 10 additions & 0 deletions examples/example-next/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Button } from "ui";

export default function Web() {
return (
<div>
<h1>Web</h1>
<Button />
</div>
);
}
5 changes: 5 additions & 0 deletions examples/example-next/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": "tsconfig/nextjs.json",
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}

0 comments on commit df99d56

Please sign in to comment.