-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yell0wflash
committed
Aug 11, 2022
1 parent
76f7b73
commit 0146150
Showing
8 changed files
with
516 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
reactStrictMode: true, | ||
optimizeFonts: true, | ||
experimental: { | ||
externalDir: true | ||
} | ||
} | ||
|
||
const withTM = require('next-transpile-modules')([], { | ||
resolveSymlinks: true, | ||
debug: false | ||
}) | ||
|
||
module.exports = withTM(nextConfig) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "@textea/json-viewer-example-basic", | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev -p 3020", | ||
"build": "next build", | ||
"start": "next start", | ||
"lint": "next lint" | ||
}, | ||
"dependencies": { | ||
"next": "^12.2.4", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^18.0.17", | ||
"@types/react-dom": "^18.0.6", | ||
"next-transpile-modules": "^9.0.0", | ||
"typescript": "^4.7.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type React from 'react' | ||
import JsonViewer from '@textea/json-viewer' | ||
|
||
const example = { | ||
string: 'this is a test string', | ||
integer: 42, | ||
array: [1, 2, 3, 'test', NaN], | ||
float: 3.14159, | ||
undefined: undefined, | ||
object: { | ||
'first-child': true, | ||
'second-child': false, | ||
'last-child': null | ||
}, | ||
string_number: '1234', | ||
date: new Date() | ||
} | ||
|
||
const IndexPage: React.FC = () => { | ||
return ( | ||
<div> | ||
<JsonViewer src={example}/> | ||
</div> | ||
) | ||
} | ||
|
||
export default IndexPage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"extends": "@textea/dev-kit/config/tsconfig.root.json", | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"paths": { | ||
"@textea/json-viewer": ["../../src/index"] | ||
}, | ||
"jsx": "preserve", | ||
"jsxImportSource": "react", | ||
"noEmit": true | ||
}, | ||
"include": [ | ||
"next-env.d.ts", | ||
"**/*.ts", | ||
"**/*.tsx" | ||
], | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |
Oops, something went wrong.