Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2966002

Browse files
committed
Add some docs a links to improve the out-of-box experience.
1 parent 03da071 commit 2966002

File tree

4 files changed

+58
-13
lines changed

4 files changed

+58
-13
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
# pyscript
1+
# pyscript
2+
3+
To demonstrate pyscript, see [the pyscript folder](pyscriptjs/README.md).

pyscriptjs/README.md

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,36 @@
1-
# Svelte TypeScript Tailwindcss Setup
1+
# PyScript Demonstrator
22

3-
svelte template based on the default svelte/template with enabled typescript and tailwindcss support.
3+
A simple webapp to demonstrate the capabilities of PyScript.
44

5-
Related blogpost (on Svelte+TS+Tailwind): https://www.liip.ch/en/blog/svelte-typescript-tailwind-setup
5+
## Getting started
66

7-
```bash
8-
npx degit munxar/svelte-template my-svelte-project
9-
cd my-svelte-project
10-
npm i
11-
npm run dev
12-
```
7+
1. If you don't already have Node.js, install it. The official installer for the
8+
LTS version of Node is available from [nodejs.org](https://nodejs.org/).
9+
10+
2. If you don't already have Rollup, install it. Rollup can be installed as a
11+
global resource using:
12+
13+
$ npm install --global rollup
14+
15+
3. Install the demo apps requirements:
16+
17+
$ npm install
18+
19+
4. Start the server:
20+
21+
$ npm run dev
22+
23+
This will compile the resources for the app, and start the development server.
24+
25+
5. When the compilation completes, it will display something like:
26+
27+
Your application is ready~! 🚀
28+
29+
- Local: http://localhost:8080
30+
- Network: Add `--host` to expose
31+
32+
────────────────── LOGS ──────────────────
33+
34+
Once this is visible, open a browser at
35+
[http://localhost:8080](http://localhost:8080). This will provide a list of
36+
demos that you can run.

pyscriptjs/public/index.html

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,29 @@
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width,initial-scale=1" />
66

7-
<title>Svelte app</title>
7+
<title>PyScript demo</title>
88

99
<link rel="icon" type="image/png" href="favicon.png" />
1010
<link rel="stylesheet" href="build/bundle.css" />
11-
11+
1212
<script defer src="build/bundle.js"></script>
1313
</head>
1414

15-
<body></body>
15+
<body class="container">
16+
17+
<h1 class="text-3xl font-bold">PyScript demos</h1>
18+
<hr/>
19+
20+
<h2 class="text-2xl font-bold text-blue-600"><a href="./simple_script.html">Simple script</a></h2>
21+
<p>A static demo of the <code>&lt;py-script&gt;</code> tag</p>
22+
23+
<h2 class="text-2xl font-bold text-blue-600"><a href="./simple_script2.html">Simple script 2</a></h2>
24+
<p>A dynamic demo of the <code>&lt;py-script&gt;</code> tag</p>
25+
26+
<h2 class="text-2xl font-bold text-blue-600"><a href="./repl.html">REPL</a></h2>
27+
<p>A Python REPL (Read Eval Print Loop). </p>
28+
29+
<h2 class="text-2xl font-bold text-blue-600"><a href="./repl2.html">REPL2</a></h2>
30+
<p>A Python REPL (Read Eval Print Loop) with slightly better formatting.</p>
31+
</body>
1632
</html>

pyscriptjs/tailwind.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ module.exports = {
1616
darkMode: false, // or 'media' or 'class'
1717
theme: {
1818
extend: {},
19+
container: {
20+
center: true
21+
}
1922
},
2023
variants: {
2124
extend: {},

0 commit comments

Comments
 (0)