-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(template): add solidjs (beta) (#447)
Co-authored-by: Jasper De Moor <jasperdemoor@gmail.com>
- Loading branch information
1 parent
00efb20
commit 7b03882
Showing
8 changed files
with
80 additions
and
39 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
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,4 +1,4 @@ | ||
import { Sandpack } from "../"; | ||
import { Sandpack } from "./"; | ||
|
||
export default { | ||
title: "Intro/Playground", | ||
|
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
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,58 @@ | ||
import type { SandboxTemplate } from "../types"; | ||
|
||
export const SOLID_TEMPLATE: SandboxTemplate = { | ||
files: { | ||
"/App.tsx": { | ||
code: `import { Component } from "solid-js"; | ||
const App: Component = () => { | ||
return <h1>Hello Solid!</h1>; | ||
}; | ||
export default App;`, | ||
}, | ||
"/index.tsx": { | ||
code: `import { render } from "solid-js/web"; | ||
import App from "./App"; | ||
import "./styles.css"; | ||
render(() => <App />, document.getElementById("app"));`, | ||
}, | ||
"/styles.css": { | ||
code: `body { | ||
font-family: sans-serif; | ||
-webkit-font-smoothing: auto; | ||
-moz-font-smoothing: auto; | ||
-moz-osx-font-smoothing: grayscale; | ||
font-smoothing: auto; | ||
text-rendering: optimizeLegibility; | ||
font-smooth: always; | ||
-webkit-tap-highlight-color: transparent; | ||
-webkit-touch-callout: none; | ||
} | ||
h1 { | ||
font-size: 1.5rem; | ||
}`, | ||
}, | ||
"/index.html": { | ||
code: `<html> | ||
<head> | ||
<title>Parcel Sandbox</title> | ||
<meta charset="UTF-8" /> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script src="src/index.tsx"></script> | ||
</body> | ||
</html>`, | ||
}, | ||
}, | ||
dependencies: { | ||
"solid-js": "1.3.15", | ||
}, | ||
entry: "/index.tsx", | ||
main: "/App.tsx", | ||
environment: "solid", | ||
}; |
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