From 2966002e446f91e592c76bebe1c65f7403b0df86 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Fri, 1 Apr 2022 14:20:14 +0800 Subject: [PATCH] Add some docs a links to improve the out-of-box experience. --- README.md | 4 +++- pyscriptjs/README.md | 42 +++++++++++++++++++++++++++-------- pyscriptjs/public/index.html | 22 +++++++++++++++--- pyscriptjs/tailwind.config.js | 3 +++ 4 files changed, 58 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 20cb3d0..faaaed4 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -# pyscript \ No newline at end of file +# pyscript + +To demonstrate pyscript, see [the pyscript folder](pyscriptjs/README.md). diff --git a/pyscriptjs/README.md b/pyscriptjs/README.md index 5145177..1004892 100644 --- a/pyscriptjs/README.md +++ b/pyscriptjs/README.md @@ -1,12 +1,36 @@ -# Svelte TypeScript Tailwindcss Setup +# PyScript Demonstrator -svelte template based on the default svelte/template with enabled typescript and tailwindcss support. +A simple webapp to demonstrate the capabilities of PyScript. -Related blogpost (on Svelte+TS+Tailwind): https://www.liip.ch/en/blog/svelte-typescript-tailwind-setup +## Getting started -```bash -npx degit munxar/svelte-template my-svelte-project -cd my-svelte-project -npm i -npm run dev -``` +1. If you don't already have Node.js, install it. The official installer for the + LTS version of Node is available from [nodejs.org](https://nodejs.org/). + +2. If you don't already have Rollup, install it. Rollup can be installed as a + global resource using: + + $ npm install --global rollup + +3. Install the demo apps requirements: + + $ npm install + +4. Start the server: + + $ npm run dev + + This will compile the resources for the app, and start the development server. + +5. When the compilation completes, it will display something like: + + Your application is ready~! 🚀 + + - Local: http://localhost:8080 + - Network: Add `--host` to expose + + ────────────────── LOGS ────────────────── + + Once this is visible, open a browser at + [http://localhost:8080](http://localhost:8080). This will provide a list of + demos that you can run. diff --git a/pyscriptjs/public/index.html b/pyscriptjs/public/index.html index ab04f07..a155030 100644 --- a/pyscriptjs/public/index.html +++ b/pyscriptjs/public/index.html @@ -4,13 +4,29 @@ - Svelte app + PyScript demo - + - + + +

PyScript demos

+
+ +

Simple script

+

A static demo of the <py-script> tag

+ +

Simple script 2

+

A dynamic demo of the <py-script> tag

+ +

REPL

+

A Python REPL (Read Eval Print Loop).

+ +

REPL2

+

A Python REPL (Read Eval Print Loop) with slightly better formatting.

+ diff --git a/pyscriptjs/tailwind.config.js b/pyscriptjs/tailwind.config.js index a5386f1..48a1a22 100644 --- a/pyscriptjs/tailwind.config.js +++ b/pyscriptjs/tailwind.config.js @@ -16,6 +16,9 @@ module.exports = { darkMode: false, // or 'media' or 'class' theme: { extend: {}, + container: { + center: true + } }, variants: { extend: {},