Skip to content

Commit d1d4ccb

Browse files
committed
update next example
1 parent 0521002 commit d1d4ccb

File tree

8 files changed

+18
-49
lines changed

8 files changed

+18
-49
lines changed

examples/next/components/special-layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const Layout: FC = ({ children }) => {
99
top: 0,
1010
left: 0,
1111
display: 'flex',
12-
justfiyContent: 'center',
12+
justifyContent: 'center',
1313
alignItems: 'center',
1414
width: '100%',
1515
height: 64,

examples/next/next-env.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/// <reference types="next" />
2-
/// <reference types="next/types/global" />
32
/// <reference types="next/image-types/global" />
43

54
// NOTE: This file should not be edited

examples/next/next.config.js

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,4 @@
1-
const codeHighlight = require('@orgajs/reorg-shiki').default
2-
const path = require('path')
3-
const withOrga = require('@orgajs/next').default({
4-
defaultLayout: require.resolve('./components/layout.tsx'),
5-
reorgPlugins: [
6-
[
7-
codeHighlight,
8-
{
9-
langs: [
10-
{
11-
id: 'org',
12-
scopeName: 'source.org',
13-
path: path.resolve(__dirname, 'org.tmLanguage.json'),
14-
},
15-
],
16-
},
17-
],
18-
],
19-
estree: {},
20-
})
1+
const withOrga = require('@orgajs/next').default({})
212

223
module.exports = withOrga({
234
pageExtensions: ['js', 'jsx', 'tsx', 'org'],

examples/next/package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22
"name": "@orgajs/example-next",
33
"version": "3.0.14",
44
"private": true,
5-
"type": "module",
65
"scripts": {
76
"dev": "next dev",
87
"build": "next build",
98
"start": "next start"
109
},
1110
"dependencies": {
12-
"@orgajs/loader": "3.1.10",
13-
"@orgajs/next": "3.1.12",
14-
"@orgajs/react": "3.0.1",
15-
"@orgajs/reorg-shiki": "1.0.2",
11+
"@orgajs/loader": "workspace:^",
12+
"@orgajs/next": "workspace:^",
13+
"@orgajs/react": "workspace:^",
1614
"eslint-config-next": "^13.4.1",
1715
"next": "^13.4.1",
1816
"react": "^18.2.0",

examples/next/pages/_app.tsx

Lines changed: 0 additions & 19 deletions
This file was deleted.

examples/next/pages/react-page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @ts-ignore
12
import Banner, { words } from '../components/banner.org'
23

34
const ReactPage = () => {

examples/next/tsconfig.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"lib": ["dom", "dom.iterable", "esnext"],
55
"allowJs": true,
66
"skipLibCheck": true,
7-
"strict": false,
7+
"strict": true,
88
"forceConsistentCasingInFileNames": true,
99
"noEmit": true,
1010
"esModuleInterop": true,
@@ -13,8 +13,16 @@
1313
"resolveJsonModule": true,
1414
"isolatedModules": true,
1515
"jsx": "preserve",
16-
"incremental": true
16+
"incremental": true,
17+
"plugins": [
18+
{
19+
"name": "next"
20+
}
21+
],
22+
"paths": {
23+
"@/*": ["./*"]
24+
}
1725
},
18-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
26+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
1927
"exclude": ["node_modules"]
2028
}

examples/next/types/orga.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="@orgajs/orgx/types" />

0 commit comments

Comments
 (0)