From 7d52a11243accc5f35ecafcfd5f2b2b6655cc95a Mon Sep 17 00:00:00 2001 From: Geoffrey Gaillard Date: Tue, 23 Jan 2024 16:16:32 +0100 Subject: [PATCH] User code (fiddles) goes to `src/` - address user's confusion Electric-fiddle's code moved to src-contrib --- README.md | 6 ++-- deps.edn | 2 +- src-build/build.clj | 2 +- {src => src-contrib}/contrib/datafy_fs.clj | 0 {src => src-contrib}/contrib/template.cljc | 0 .../electric_fiddle/fiddle.cljc | 0 .../electric_fiddle/fiddle_markdown.cljc | 8 +++--- .../electric_fiddle/index.cljc | 0 .../electric_fiddle/main.cljc | 0 .../electric_fiddle/read_src.clj | 0 .../electric_fiddle/ring_middleware.clj | 0 .../electric_fiddle/server_httpkit.clj | 0 .../electric_fiddle/server_jetty.clj | 0 {src => src-contrib}/hyperfiddle.cljc | 0 {src => src-contrib}/models/mbrainz.clj | 0 {src => src-contrib}/models/person_model.clj | 0 {src => src-contrib}/models/seattle.clj | 0 .../models/teeshirt_orders_datascript.clj | 0 .../models/teeshirt_orders_datomic.clj | 0 src-dev/fiddle_manager.clj | 2 +- src-fiddles/hello_fiddle/fly.toml | 20 ------------- .../datomic_browser/datomic_browser.cljc | 0 .../datomic_browser/domain.cljc | 0 .../datomic_browser/fiddles.cljc | 0 .../electric_tutorial/demo_chat.cljc | 0 .../electric_tutorial/demo_chat.md | 0 .../electric_tutorial/demo_chat_extended.cljc | 0 .../electric_tutorial/demo_chat_extended.md | 0 .../electric_tutorial/demo_color.cljc | 0 .../demo_reagent_interop.cljc | 0 .../electric_tutorial/demo_reagent_interop.md | 0 .../electric_tutorial/demo_svg.cljc | 0 .../electric_tutorial/demo_svg.md | 0 .../demo_system_properties.cljc | 0 .../demo_system_properties.md | 0 .../electric_tutorial/demo_todos_simple.cljc | 0 .../electric_tutorial/demo_todos_simple.md | 0 .../electric_tutorial/demo_toggle.cljc | 0 .../electric_tutorial/demo_toggle.md | 0 .../electric_tutorial/demo_two_clocks.cljc | 0 .../electric_tutorial/demo_two_clocks.md | 0 .../electric_tutorial/demo_webview.cljc | 0 .../electric_tutorial/demo_webview.md | 0 .../electric_tutorial/fiddles.cljc | 0 .../electric_tutorial/fly.toml | 0 .../electric_tutorial/tutorial.cljc | 28 +++++++++---------- .../tutorial_7guis_1_counter.cljc | 0 .../tutorial_7guis_1_counter.md | 0 .../tutorial_7guis_2_temperature.cljc | 0 .../tutorial_7guis_2_temperature.md | 0 .../tutorial_7guis_4_timer.cljc | 0 .../tutorial_7guis_4_timer.md | 0 .../tutorial_7guis_5_crud.cljc | 0 .../tutorial_7guis_5_crud.md | 0 .../tutorial_backpressure.cljc | 0 .../tutorial_backpressure.md | 0 .../electric_tutorial/tutorial_lifecycle.cljc | 0 .../electric_tutorial/tutorial_lifecycle.md | 0 .../hello_fiddle/fiddles.cljc | 0 src/hello_fiddle/fly.toml | 20 +++++++++++++ 60 files changed, 44 insertions(+), 44 deletions(-) rename {src => src-contrib}/contrib/datafy_fs.clj (100%) rename {src => src-contrib}/contrib/template.cljc (100%) rename {src => src-contrib}/electric_fiddle/fiddle.cljc (100%) rename {src => src-contrib}/electric_fiddle/fiddle_markdown.cljc (86%) rename {src => src-contrib}/electric_fiddle/index.cljc (100%) rename {src => src-contrib}/electric_fiddle/main.cljc (100%) rename {src => src-contrib}/electric_fiddle/read_src.clj (100%) rename {src => src-contrib}/electric_fiddle/ring_middleware.clj (100%) rename {src => src-contrib}/electric_fiddle/server_httpkit.clj (100%) rename {src => src-contrib}/electric_fiddle/server_jetty.clj (100%) rename {src => src-contrib}/hyperfiddle.cljc (100%) rename {src => src-contrib}/models/mbrainz.clj (100%) rename {src => src-contrib}/models/person_model.clj (100%) rename {src => src-contrib}/models/seattle.clj (100%) rename {src => src-contrib}/models/teeshirt_orders_datascript.clj (100%) rename {src => src-contrib}/models/teeshirt_orders_datomic.clj (100%) delete mode 100644 src-fiddles/hello_fiddle/fly.toml rename {src-fiddles => src}/datomic_browser/datomic_browser.cljc (100%) rename {src-fiddles => src}/datomic_browser/domain.cljc (100%) rename {src-fiddles => src}/datomic_browser/fiddles.cljc (100%) rename {src-fiddles => src}/electric_tutorial/demo_chat.cljc (100%) rename {src-fiddles => src}/electric_tutorial/demo_chat.md (100%) rename {src-fiddles => src}/electric_tutorial/demo_chat_extended.cljc (100%) rename {src-fiddles => src}/electric_tutorial/demo_chat_extended.md (100%) rename {src-fiddles => src}/electric_tutorial/demo_color.cljc (100%) rename {src-fiddles => src}/electric_tutorial/demo_reagent_interop.cljc (100%) rename {src-fiddles => src}/electric_tutorial/demo_reagent_interop.md (100%) rename {src-fiddles => src}/electric_tutorial/demo_svg.cljc (100%) rename {src-fiddles => src}/electric_tutorial/demo_svg.md (100%) rename {src-fiddles => src}/electric_tutorial/demo_system_properties.cljc (100%) rename {src-fiddles => src}/electric_tutorial/demo_system_properties.md (100%) rename {src-fiddles => src}/electric_tutorial/demo_todos_simple.cljc (100%) rename {src-fiddles => src}/electric_tutorial/demo_todos_simple.md (100%) rename {src-fiddles => src}/electric_tutorial/demo_toggle.cljc (100%) rename {src-fiddles => src}/electric_tutorial/demo_toggle.md (100%) rename {src-fiddles => src}/electric_tutorial/demo_two_clocks.cljc (100%) rename {src-fiddles => src}/electric_tutorial/demo_two_clocks.md (100%) rename {src-fiddles => src}/electric_tutorial/demo_webview.cljc (100%) rename {src-fiddles => src}/electric_tutorial/demo_webview.md (100%) rename {src-fiddles => src}/electric_tutorial/fiddles.cljc (100%) rename {src-fiddles => src}/electric_tutorial/fly.toml (100%) rename {src-fiddles => src}/electric_tutorial/tutorial.cljc (83%) rename {src-fiddles => src}/electric_tutorial/tutorial_7guis_1_counter.cljc (100%) rename {src-fiddles => src}/electric_tutorial/tutorial_7guis_1_counter.md (100%) rename {src-fiddles => src}/electric_tutorial/tutorial_7guis_2_temperature.cljc (100%) rename {src-fiddles => src}/electric_tutorial/tutorial_7guis_2_temperature.md (100%) rename {src-fiddles => src}/electric_tutorial/tutorial_7guis_4_timer.cljc (100%) rename {src-fiddles => src}/electric_tutorial/tutorial_7guis_4_timer.md (100%) rename {src-fiddles => src}/electric_tutorial/tutorial_7guis_5_crud.cljc (100%) rename {src-fiddles => src}/electric_tutorial/tutorial_7guis_5_crud.md (100%) rename {src-fiddles => src}/electric_tutorial/tutorial_backpressure.cljc (100%) rename {src-fiddles => src}/electric_tutorial/tutorial_backpressure.md (100%) rename {src-fiddles => src}/electric_tutorial/tutorial_lifecycle.cljc (100%) rename {src-fiddles => src}/electric_tutorial/tutorial_lifecycle.md (100%) rename {src-fiddles => src}/hello_fiddle/fiddles.cljc (100%) create mode 100644 src/hello_fiddle/fly.toml diff --git a/README.md b/README.md index 8d5b323..06a303b 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ At the REPL: ``` 1. Navigate to [http://localhost:8080](http://localhost:8080) -2. Corresponding source code is in `src-fiddles/hello_world` +2. Corresponding source code is in `src/hello_world` ## Load more fiddles @@ -62,8 +62,8 @@ Optional: ## Roll your own -1. `mkdir src-fiddles/my_fiddle` -3. Add the following to `src-fiddles/my_fiddle/fiddles.cljc`: +1. `mkdir src/my_fiddle` +3. Add the following to `src/my_fiddle/fiddles.cljc`: ```clojure (ns my-fiddle.fiddles (:require [hyperfiddle.electric :as e] diff --git a/deps.edn b/deps.edn index 79116d0..089653a 100644 --- a/deps.edn +++ b/deps.edn @@ -8,7 +8,7 @@ ring-basic-authentication/ring-basic-authentication {:mvn/version "1.2.0"} } - :paths ["src" "resources" "src-fiddles"] + :paths ["src" "resources" "src-contrib"] :aliases {:dev diff --git a/src-build/build.clj b/src-build/build.clj index 575bb31..c622a2b 100644 --- a/src-build/build.clj +++ b/src-build/build.clj @@ -62,7 +62,7 @@ so do not use `clj -T`" :optimize optimize, :debug debug, :verbose verbose})) (b/copy-dir {:target-dir class-dir :src-dirs ["src" "src-prod" "resources"]}) - (b/copy-dir {:target-dir (str class-dir "/" (domain->dir domain)) :src-dirs [(str "src-fiddles/" (domain->dir domain))]}) + (b/copy-dir {:target-dir (str class-dir "/" (domain->dir domain)) :src-dirs [(str "src/" (domain->dir domain))]}) (let [jar-name (or (some-> jar-name str) ; override for Dockerfile builds to avoid needing to reconstruct the name (format "target/electricfiddle-%s-%s.jar" domain electric-user-version)) aliases [:prod (keyword domain)]] diff --git a/src/contrib/datafy_fs.clj b/src-contrib/contrib/datafy_fs.clj similarity index 100% rename from src/contrib/datafy_fs.clj rename to src-contrib/contrib/datafy_fs.clj diff --git a/src/contrib/template.cljc b/src-contrib/contrib/template.cljc similarity index 100% rename from src/contrib/template.cljc rename to src-contrib/contrib/template.cljc diff --git a/src/electric_fiddle/fiddle.cljc b/src-contrib/electric_fiddle/fiddle.cljc similarity index 100% rename from src/electric_fiddle/fiddle.cljc rename to src-contrib/electric_fiddle/fiddle.cljc diff --git a/src/electric_fiddle/fiddle_markdown.cljc b/src-contrib/electric_fiddle/fiddle_markdown.cljc similarity index 86% rename from src/electric_fiddle/fiddle_markdown.cljc rename to src-contrib/electric_fiddle/fiddle_markdown.cljc index 3a3693e..35048a6 100644 --- a/src/electric_fiddle/fiddle_markdown.cljc +++ b/src-contrib/electric_fiddle/fiddle_markdown.cljc @@ -20,11 +20,11 @@ (set! (.-innerHTML dom/node) html)))) (def essays - {'electric-y-combinator "src-fiddles/dustingetz/electric_y_combinator.md" - 'hfql-intro "src-fiddles/dustingetz/hfql_intro.md" - 'hfql-teeshirt-orders "src-fiddles/dustingetz/hfql_teeshirt_orders.md" + {'electric-y-combinator "src/dustingetz/electric_y_combinator.md" + 'hfql-intro "src/dustingetz/hfql_intro.md" + 'hfql-teeshirt-orders "src/dustingetz/hfql_teeshirt_orders.md" - 'demo_two_clocks "src-fiddles/electric_tutorial/demo_two_clocks.md"}) + 'demo_two_clocks "src/electric_tutorial/demo_two_clocks.md"}) (defn parse-md-directive [s] (let [[_ extension alt-text arg arg2] (re-find #"!(.*?)\[(.*?)\]\((.*?)\)(?:\((.*?)\))?" s)] diff --git a/src/electric_fiddle/index.cljc b/src-contrib/electric_fiddle/index.cljc similarity index 100% rename from src/electric_fiddle/index.cljc rename to src-contrib/electric_fiddle/index.cljc diff --git a/src/electric_fiddle/main.cljc b/src-contrib/electric_fiddle/main.cljc similarity index 100% rename from src/electric_fiddle/main.cljc rename to src-contrib/electric_fiddle/main.cljc diff --git a/src/electric_fiddle/read_src.clj b/src-contrib/electric_fiddle/read_src.clj similarity index 100% rename from src/electric_fiddle/read_src.clj rename to src-contrib/electric_fiddle/read_src.clj diff --git a/src/electric_fiddle/ring_middleware.clj b/src-contrib/electric_fiddle/ring_middleware.clj similarity index 100% rename from src/electric_fiddle/ring_middleware.clj rename to src-contrib/electric_fiddle/ring_middleware.clj diff --git a/src/electric_fiddle/server_httpkit.clj b/src-contrib/electric_fiddle/server_httpkit.clj similarity index 100% rename from src/electric_fiddle/server_httpkit.clj rename to src-contrib/electric_fiddle/server_httpkit.clj diff --git a/src/electric_fiddle/server_jetty.clj b/src-contrib/electric_fiddle/server_jetty.clj similarity index 100% rename from src/electric_fiddle/server_jetty.clj rename to src-contrib/electric_fiddle/server_jetty.clj diff --git a/src/hyperfiddle.cljc b/src-contrib/hyperfiddle.cljc similarity index 100% rename from src/hyperfiddle.cljc rename to src-contrib/hyperfiddle.cljc diff --git a/src/models/mbrainz.clj b/src-contrib/models/mbrainz.clj similarity index 100% rename from src/models/mbrainz.clj rename to src-contrib/models/mbrainz.clj diff --git a/src/models/person_model.clj b/src-contrib/models/person_model.clj similarity index 100% rename from src/models/person_model.clj rename to src-contrib/models/person_model.clj diff --git a/src/models/seattle.clj b/src-contrib/models/seattle.clj similarity index 100% rename from src/models/seattle.clj rename to src-contrib/models/seattle.clj diff --git a/src/models/teeshirt_orders_datascript.clj b/src-contrib/models/teeshirt_orders_datascript.clj similarity index 100% rename from src/models/teeshirt_orders_datascript.clj rename to src-contrib/models/teeshirt_orders_datascript.clj diff --git a/src/models/teeshirt_orders_datomic.clj b/src-contrib/models/teeshirt_orders_datomic.clj similarity index 100% rename from src/models/teeshirt_orders_datomic.clj rename to src-contrib/models/teeshirt_orders_datomic.clj diff --git a/src-dev/fiddle_manager.clj b/src-dev/fiddle_manager.clj index 1929986..807b595 100644 --- a/src-dev/fiddle_manager.clj +++ b/src-dev/fiddle_manager.clj @@ -41,7 +41,7 @@ "\nPossible causes:" "\n - this fiddle doesn’t exist" "\n - is `" fiddle "` the right name?" - "\n - is there a corresponding file named `src-fiddles/" (munge fiddle) "/fiddles.cljc`?" + "\n - is there a corresponding file named `src/" (munge fiddle) "/fiddles.cljc`?" ) (instance? java.io.FileNotFoundException (ex-cause error)) (str diff --git a/src-fiddles/hello_fiddle/fly.toml b/src-fiddles/hello_fiddle/fly.toml deleted file mode 100644 index 8453898..0000000 --- a/src-fiddles/hello_fiddle/fly.toml +++ /dev/null @@ -1,20 +0,0 @@ -app = "hello-fiddle" -primary_region = "ewr" - -[http_service] - internal_port = 8080 - force_https = true - auto_stop_machines = true - auto_start_machines = true - min_machines_running = 0 - processes = ["app"] - -[build.args] - HYPERFIDDLE_DOMAIN="hello-fiddle" - - -# NO_COLOR=1 fly deploy --config src-fiddles/hello_fiddle/fly.toml --remote-only --build-only - -# fly scale vm shared-cpu-8x --config src-fiddles/hello_fiddle/fly.toml -# fly scale show --config src-fiddles/hello_fiddle/fly.toml -# fly status --config src-fiddles/hello_fiddle/fly.toml \ No newline at end of file diff --git a/src-fiddles/datomic_browser/datomic_browser.cljc b/src/datomic_browser/datomic_browser.cljc similarity index 100% rename from src-fiddles/datomic_browser/datomic_browser.cljc rename to src/datomic_browser/datomic_browser.cljc diff --git a/src-fiddles/datomic_browser/domain.cljc b/src/datomic_browser/domain.cljc similarity index 100% rename from src-fiddles/datomic_browser/domain.cljc rename to src/datomic_browser/domain.cljc diff --git a/src-fiddles/datomic_browser/fiddles.cljc b/src/datomic_browser/fiddles.cljc similarity index 100% rename from src-fiddles/datomic_browser/fiddles.cljc rename to src/datomic_browser/fiddles.cljc diff --git a/src-fiddles/electric_tutorial/demo_chat.cljc b/src/electric_tutorial/demo_chat.cljc similarity index 100% rename from src-fiddles/electric_tutorial/demo_chat.cljc rename to src/electric_tutorial/demo_chat.cljc diff --git a/src-fiddles/electric_tutorial/demo_chat.md b/src/electric_tutorial/demo_chat.md similarity index 100% rename from src-fiddles/electric_tutorial/demo_chat.md rename to src/electric_tutorial/demo_chat.md diff --git a/src-fiddles/electric_tutorial/demo_chat_extended.cljc b/src/electric_tutorial/demo_chat_extended.cljc similarity index 100% rename from src-fiddles/electric_tutorial/demo_chat_extended.cljc rename to src/electric_tutorial/demo_chat_extended.cljc diff --git a/src-fiddles/electric_tutorial/demo_chat_extended.md b/src/electric_tutorial/demo_chat_extended.md similarity index 100% rename from src-fiddles/electric_tutorial/demo_chat_extended.md rename to src/electric_tutorial/demo_chat_extended.md diff --git a/src-fiddles/electric_tutorial/demo_color.cljc b/src/electric_tutorial/demo_color.cljc similarity index 100% rename from src-fiddles/electric_tutorial/demo_color.cljc rename to src/electric_tutorial/demo_color.cljc diff --git a/src-fiddles/electric_tutorial/demo_reagent_interop.cljc b/src/electric_tutorial/demo_reagent_interop.cljc similarity index 100% rename from src-fiddles/electric_tutorial/demo_reagent_interop.cljc rename to src/electric_tutorial/demo_reagent_interop.cljc diff --git a/src-fiddles/electric_tutorial/demo_reagent_interop.md b/src/electric_tutorial/demo_reagent_interop.md similarity index 100% rename from src-fiddles/electric_tutorial/demo_reagent_interop.md rename to src/electric_tutorial/demo_reagent_interop.md diff --git a/src-fiddles/electric_tutorial/demo_svg.cljc b/src/electric_tutorial/demo_svg.cljc similarity index 100% rename from src-fiddles/electric_tutorial/demo_svg.cljc rename to src/electric_tutorial/demo_svg.cljc diff --git a/src-fiddles/electric_tutorial/demo_svg.md b/src/electric_tutorial/demo_svg.md similarity index 100% rename from src-fiddles/electric_tutorial/demo_svg.md rename to src/electric_tutorial/demo_svg.md diff --git a/src-fiddles/electric_tutorial/demo_system_properties.cljc b/src/electric_tutorial/demo_system_properties.cljc similarity index 100% rename from src-fiddles/electric_tutorial/demo_system_properties.cljc rename to src/electric_tutorial/demo_system_properties.cljc diff --git a/src-fiddles/electric_tutorial/demo_system_properties.md b/src/electric_tutorial/demo_system_properties.md similarity index 100% rename from src-fiddles/electric_tutorial/demo_system_properties.md rename to src/electric_tutorial/demo_system_properties.md diff --git a/src-fiddles/electric_tutorial/demo_todos_simple.cljc b/src/electric_tutorial/demo_todos_simple.cljc similarity index 100% rename from src-fiddles/electric_tutorial/demo_todos_simple.cljc rename to src/electric_tutorial/demo_todos_simple.cljc diff --git a/src-fiddles/electric_tutorial/demo_todos_simple.md b/src/electric_tutorial/demo_todos_simple.md similarity index 100% rename from src-fiddles/electric_tutorial/demo_todos_simple.md rename to src/electric_tutorial/demo_todos_simple.md diff --git a/src-fiddles/electric_tutorial/demo_toggle.cljc b/src/electric_tutorial/demo_toggle.cljc similarity index 100% rename from src-fiddles/electric_tutorial/demo_toggle.cljc rename to src/electric_tutorial/demo_toggle.cljc diff --git a/src-fiddles/electric_tutorial/demo_toggle.md b/src/electric_tutorial/demo_toggle.md similarity index 100% rename from src-fiddles/electric_tutorial/demo_toggle.md rename to src/electric_tutorial/demo_toggle.md diff --git a/src-fiddles/electric_tutorial/demo_two_clocks.cljc b/src/electric_tutorial/demo_two_clocks.cljc similarity index 100% rename from src-fiddles/electric_tutorial/demo_two_clocks.cljc rename to src/electric_tutorial/demo_two_clocks.cljc diff --git a/src-fiddles/electric_tutorial/demo_two_clocks.md b/src/electric_tutorial/demo_two_clocks.md similarity index 100% rename from src-fiddles/electric_tutorial/demo_two_clocks.md rename to src/electric_tutorial/demo_two_clocks.md diff --git a/src-fiddles/electric_tutorial/demo_webview.cljc b/src/electric_tutorial/demo_webview.cljc similarity index 100% rename from src-fiddles/electric_tutorial/demo_webview.cljc rename to src/electric_tutorial/demo_webview.cljc diff --git a/src-fiddles/electric_tutorial/demo_webview.md b/src/electric_tutorial/demo_webview.md similarity index 100% rename from src-fiddles/electric_tutorial/demo_webview.md rename to src/electric_tutorial/demo_webview.md diff --git a/src-fiddles/electric_tutorial/fiddles.cljc b/src/electric_tutorial/fiddles.cljc similarity index 100% rename from src-fiddles/electric_tutorial/fiddles.cljc rename to src/electric_tutorial/fiddles.cljc diff --git a/src-fiddles/electric_tutorial/fly.toml b/src/electric_tutorial/fly.toml similarity index 100% rename from src-fiddles/electric_tutorial/fly.toml rename to src/electric_tutorial/fly.toml diff --git a/src-fiddles/electric_tutorial/tutorial.cljc b/src/electric_tutorial/tutorial.cljc similarity index 83% rename from src-fiddles/electric_tutorial/tutorial.cljc rename to src/electric_tutorial/tutorial.cljc index 9fbbbff..8909071 100644 --- a/src-fiddles/electric_tutorial/tutorial.cljc +++ b/src/electric_tutorial/tutorial.cljc @@ -100,20 +100,20 @@ (dom/text (str (title next) " >")))))))) (def tutorials2 - {`electric-tutorial.demo-two-clocks/TwoClocks "src-fiddles/electric_tutorial/demo_two_clocks.md" - `electric-tutorial.demo-toggle/Toggle "src-fiddles/electric_tutorial/demo_toggle.md" - `electric-tutorial.demo-system-properties/SystemProperties "src-fiddles/electric_tutorial/demo_system_properties.md" - `electric-tutorial.demo-chat/Chat "src-fiddles/electric_tutorial/demo_chat.md" - `electric-tutorial.tutorial-backpressure/Backpressure "src-fiddles/electric_tutorial/tutorial_backpressure.md" - `electric-tutorial.tutorial-lifecycle/Lifecycle "src-fiddles/electric_tutorial/tutorial_lifecycle.md" - `electric-tutorial.demo-chat-extended/ChatExtended "src-fiddles/electric_tutorial/demo_chat_extended.md" - `electric-tutorial.demo-webview/Webview "src-fiddles/electric_tutorial/demo_webview.md" - `electric-tutorial.demo-todos-simple/TodoList "src-fiddles/electric_tutorial/demo_todos_simple.md" - `electric-tutorial.demo-svg/SVG "src-fiddles/electric_tutorial/demo_svg.md" - `electric-tutorial.tutorial-7guis-1-counter/Counter "src-fiddles/electric_tutorial/tutorial_7guis_1_counter.md" - `electric-tutorial.tutorial-7guis-2-temperature/TemperatureConverter "src-fiddles/electric_tutorial/tutorial_7guis_2_temperature.md" - `electric-tutorial.tutorial-7guis-4-timer/Timer "src-fiddles/electric_tutorial/tutorial_7guis_4_timer.md" - `electric-tutorial.tutorial-7guis-5-crud/CRUD "src-fiddles/electric_tutorial/tutorial_7guis_5_crud.md" + {`electric-tutorial.demo-two-clocks/TwoClocks "src/electric_tutorial/demo_two_clocks.md" + `electric-tutorial.demo-toggle/Toggle "src/electric_tutorial/demo_toggle.md" + `electric-tutorial.demo-system-properties/SystemProperties "src/electric_tutorial/demo_system_properties.md" + `electric-tutorial.demo-chat/Chat "src/electric_tutorial/demo_chat.md" + `electric-tutorial.tutorial-backpressure/Backpressure "src/electric_tutorial/tutorial_backpressure.md" + `electric-tutorial.tutorial-lifecycle/Lifecycle "src/electric_tutorial/tutorial_lifecycle.md" + `electric-tutorial.demo-chat-extended/ChatExtended "src/electric_tutorial/demo_chat_extended.md" + `electric-tutorial.demo-webview/Webview "src/electric_tutorial/demo_webview.md" + `electric-tutorial.demo-todos-simple/TodoList "src/electric_tutorial/demo_todos_simple.md" + `electric-tutorial.demo-svg/SVG "src/electric_tutorial/demo_svg.md" + `electric-tutorial.tutorial-7guis-1-counter/Counter "src/electric_tutorial/tutorial_7guis_1_counter.md" + `electric-tutorial.tutorial-7guis-2-temperature/TemperatureConverter "src/electric_tutorial/tutorial_7guis_2_temperature.md" + `electric-tutorial.tutorial-7guis-4-timer/Timer "src/electric_tutorial/tutorial_7guis_4_timer.md" + `electric-tutorial.tutorial-7guis-5-crud/CRUD "src/electric_tutorial/tutorial_7guis_5_crud.md" ;`electric-tutorial.demo-reagent-interop/ReagentInterop "" }) diff --git a/src-fiddles/electric_tutorial/tutorial_7guis_1_counter.cljc b/src/electric_tutorial/tutorial_7guis_1_counter.cljc similarity index 100% rename from src-fiddles/electric_tutorial/tutorial_7guis_1_counter.cljc rename to src/electric_tutorial/tutorial_7guis_1_counter.cljc diff --git a/src-fiddles/electric_tutorial/tutorial_7guis_1_counter.md b/src/electric_tutorial/tutorial_7guis_1_counter.md similarity index 100% rename from src-fiddles/electric_tutorial/tutorial_7guis_1_counter.md rename to src/electric_tutorial/tutorial_7guis_1_counter.md diff --git a/src-fiddles/electric_tutorial/tutorial_7guis_2_temperature.cljc b/src/electric_tutorial/tutorial_7guis_2_temperature.cljc similarity index 100% rename from src-fiddles/electric_tutorial/tutorial_7guis_2_temperature.cljc rename to src/electric_tutorial/tutorial_7guis_2_temperature.cljc diff --git a/src-fiddles/electric_tutorial/tutorial_7guis_2_temperature.md b/src/electric_tutorial/tutorial_7guis_2_temperature.md similarity index 100% rename from src-fiddles/electric_tutorial/tutorial_7guis_2_temperature.md rename to src/electric_tutorial/tutorial_7guis_2_temperature.md diff --git a/src-fiddles/electric_tutorial/tutorial_7guis_4_timer.cljc b/src/electric_tutorial/tutorial_7guis_4_timer.cljc similarity index 100% rename from src-fiddles/electric_tutorial/tutorial_7guis_4_timer.cljc rename to src/electric_tutorial/tutorial_7guis_4_timer.cljc diff --git a/src-fiddles/electric_tutorial/tutorial_7guis_4_timer.md b/src/electric_tutorial/tutorial_7guis_4_timer.md similarity index 100% rename from src-fiddles/electric_tutorial/tutorial_7guis_4_timer.md rename to src/electric_tutorial/tutorial_7guis_4_timer.md diff --git a/src-fiddles/electric_tutorial/tutorial_7guis_5_crud.cljc b/src/electric_tutorial/tutorial_7guis_5_crud.cljc similarity index 100% rename from src-fiddles/electric_tutorial/tutorial_7guis_5_crud.cljc rename to src/electric_tutorial/tutorial_7guis_5_crud.cljc diff --git a/src-fiddles/electric_tutorial/tutorial_7guis_5_crud.md b/src/electric_tutorial/tutorial_7guis_5_crud.md similarity index 100% rename from src-fiddles/electric_tutorial/tutorial_7guis_5_crud.md rename to src/electric_tutorial/tutorial_7guis_5_crud.md diff --git a/src-fiddles/electric_tutorial/tutorial_backpressure.cljc b/src/electric_tutorial/tutorial_backpressure.cljc similarity index 100% rename from src-fiddles/electric_tutorial/tutorial_backpressure.cljc rename to src/electric_tutorial/tutorial_backpressure.cljc diff --git a/src-fiddles/electric_tutorial/tutorial_backpressure.md b/src/electric_tutorial/tutorial_backpressure.md similarity index 100% rename from src-fiddles/electric_tutorial/tutorial_backpressure.md rename to src/electric_tutorial/tutorial_backpressure.md diff --git a/src-fiddles/electric_tutorial/tutorial_lifecycle.cljc b/src/electric_tutorial/tutorial_lifecycle.cljc similarity index 100% rename from src-fiddles/electric_tutorial/tutorial_lifecycle.cljc rename to src/electric_tutorial/tutorial_lifecycle.cljc diff --git a/src-fiddles/electric_tutorial/tutorial_lifecycle.md b/src/electric_tutorial/tutorial_lifecycle.md similarity index 100% rename from src-fiddles/electric_tutorial/tutorial_lifecycle.md rename to src/electric_tutorial/tutorial_lifecycle.md diff --git a/src-fiddles/hello_fiddle/fiddles.cljc b/src/hello_fiddle/fiddles.cljc similarity index 100% rename from src-fiddles/hello_fiddle/fiddles.cljc rename to src/hello_fiddle/fiddles.cljc diff --git a/src/hello_fiddle/fly.toml b/src/hello_fiddle/fly.toml new file mode 100644 index 0000000..e6726b8 --- /dev/null +++ b/src/hello_fiddle/fly.toml @@ -0,0 +1,20 @@ +app = "hello-fiddle" +primary_region = "ewr" + +[http_service] + internal_port = 8080 + force_https = true + auto_stop_machines = true + auto_start_machines = true + min_machines_running = 0 + processes = ["app"] + +[build.args] + HYPERFIDDLE_DOMAIN="hello-fiddle" + + +# NO_COLOR=1 fly deploy --config src/hello_fiddle/fly.toml --remote-only --build-only + +# fly scale vm shared-cpu-8x --config src/hello_fiddle/fly.toml +# fly scale show --config src/hello_fiddle/fly.toml +# fly status --config src/hello_fiddle/fly.toml \ No newline at end of file