-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update sandboxes to use vite and typescript
Closes GH-9. Reviewed-by: Titus Wormer <tituswormer@gmail.com>
- Loading branch information
1 parent
1c6b1aa
commit 545e7e2
Showing
31 changed files
with
183 additions
and
113 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
28 changes: 0 additions & 28 deletions
28
sandbox-templates/react-markdown-with-create-react-app/package.json
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
sandbox-templates/react-markdown-with-create-react-app/public/index.html
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
sandbox-templates/react-markdown-with-create-react-app/src/index.tsx
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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,12 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>react-markdown + vite + typescript</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
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,22 @@ | ||
{ | ||
"name": "react-markdown-with-vite", | ||
"version": "1.0.0", | ||
"private": true, | ||
"main": "src/main.tsx", | ||
"type": "module", | ||
"dependencies": { | ||
"react": "^18.0.0", | ||
"react-dom": "^18.0.0", | ||
"react-markdown": "^8.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^18.0.0", | ||
"@types/react-dom": "^18.0.0", | ||
"@vitejs/plugin-react": "^4.0.0", | ||
"typescript": "^5.0.0", | ||
"vite": "^4.0.0" | ||
}, | ||
"scripts": { | ||
"start": "tsc && vite" | ||
} | ||
} |
File renamed without changes.
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,10 @@ | ||
import React from 'react' | ||
// eslint-disable-next-line n/file-extension-in-import | ||
import ReactDOM from 'react-dom/client' | ||
import App from './app.js' | ||
|
||
ReactDOM.createRoot(document.querySelector<HTMLDivElement>('#root')!).render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode> | ||
) |
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,17 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2020", | ||
"useDefineForClassFields": true, | ||
"lib": ["ES2020", "DOM", "DOM.Iterable"], | ||
"module": "Node16", | ||
"jsx": "react-jsx", | ||
"isolatedModules": true, | ||
"noEmit": true, | ||
"strict": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noFallthroughCasesInSwitch": true | ||
}, | ||
"include": ["src"], | ||
"references": [{"path": "./tsconfig.node.json"}] | ||
} |
8 changes: 8 additions & 0 deletions
8
sandbox-templates/react-markdown-with-vite/tsconfig.node.json
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,8 @@ | ||
{ | ||
"compilerOptions": { | ||
"composite": true, | ||
"module": "ESNext", | ||
"moduleResolution": "bundler" | ||
}, | ||
"include": ["vite.config.ts"] | ||
} |
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,6 @@ | ||
import {defineConfig} from 'vite' | ||
import react from '@vitejs/plugin-react' | ||
|
||
export default defineConfig({ | ||
plugins: [react()] | ||
}) |
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
...ates/remark-rehype-with-parcel/index.html → ...plates/remark-rehype-with-vite/index.html
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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>remark-rehype + Parcel demo</title> | ||
<title>remark-rehype + Vite demo</title> | ||
<meta charset="utf-8"> | ||
</head> | ||
|
||
<body> | ||
<h1><code>remark-rehype</code> with Parcel</h1> | ||
<h1><code>remark-rehype</code> with Vite</h1> | ||
<h2>source</h2> | ||
<pre id="source"></pre> | ||
<h2>result</h2> | ||
<iframe id="result"></iframe> | ||
<h2>error</h2> | ||
<pre id="error">none</pre> | ||
|
||
<script type="module" src="src/index.js"></script> | ||
<script type="module" src="src/main.ts"></script> | ||
</body> | ||
</html> |
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
File renamed without changes.
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,18 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2020", | ||
"useDefineForClassFields": true, | ||
"lib": ["ES2020", "DOM", "DOM.Iterable"], | ||
"module": "Node16", | ||
"isolatedModules": true, | ||
"noEmit": true, | ||
"jsx": "react-jsx", | ||
"strict": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"skipLibCheck": true | ||
}, | ||
"include": ["src"], | ||
"references": [{"path": "./tsconfig.node.json"}] | ||
} |
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,8 @@ | ||
{ | ||
"compilerOptions": { | ||
"composite": true, | ||
"module": "ESNext", | ||
"moduleResolution": "bundler" | ||
}, | ||
"include": ["vite.config.ts"] | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
...x-templates/remark-with-parcel/index.html → ...box-templates/remark-with-vite/index.html
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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>remark + Parcel demo</title> | ||
<title>remark + Vite demo</title> | ||
<meta charset="utf-8" /> | ||
</head> | ||
|
||
<body> | ||
<h1><code>remark</code> with Parcel</h1> | ||
<h1><code>remark</code> with Vite</h1> | ||
<h2>source</h2> | ||
<pre id="source"></pre> | ||
<h2>result</h2> | ||
<pre id="result"></pre> | ||
<h2>error</h2> | ||
<pre id="error">none</pre> | ||
|
||
<script type="module" src="src/index.js"></script> | ||
<script type="module" src="src/main.ts"></script> | ||
</body> | ||
</html> |
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,17 @@ | ||
{ | ||
"name": "remark-with-vite", | ||
"version": "1.0.0", | ||
"private": true, | ||
"type": "module", | ||
"main": "src/main.ts", | ||
"scripts": { | ||
"start": "tsc && vite" | ||
}, | ||
"dependencies": { | ||
"remark": "^14.0.0" | ||
}, | ||
"devDependencies": { | ||
"typescript": "^5.0.0", | ||
"vite": "^4.0.0" | ||
} | ||
} |
File renamed without changes.
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
Oops, something went wrong.