{"id":21804884,"url":"https://github.com/pez/shadow-bare-bones","last_synced_at":"2025-03-21T07:41:38.008Z","repository":{"id":66560191,"uuid":"594784002","full_name":"PEZ/shadow-bare-bones","owner":"PEZ","description":"A mini-project to quickly get started with ClojureScript for hacking on a browser app","archived":false,"fork":false,"pushed_at":"2023-01-31T09:41:38.000Z","size":66,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-26T04:25:15.819Z","etag":null,"topics":["clojure","clojurescript","getting-started","shadow-cljs"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PEZ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["PEZ"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-01-29T16:27:52.000Z","updated_at":"2023-11-21T07:46:50.000Z","dependencies_parsed_at":"2023-02-28T20:15:41.730Z","dependency_job_id":null,"html_url":"https://github.com/PEZ/shadow-bare-bones","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PEZ%2Fshadow-bare-bones","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PEZ%2Fshadow-bare-bones/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PEZ%2Fshadow-bare-bones/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PEZ%2Fshadow-bare-bones/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PEZ","download_url":"https://codeload.github.com/PEZ/shadow-bare-bones/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244759813,"owners_count":20505709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clojure","clojurescript","getting-started","shadow-cljs"],"created_at":"2024-11-27T11:57:17.238Z","updated_at":"2025-03-21T07:41:37.415Z","avatar_url":"https://github.com/PEZ.png","language":"Clojure","readme":"# Bare Bones shadow-cljs + reagent\n\nThis is a mini-project to quickly get started with [ClojureScript](https://clojurescript.org) for hacking on a browser app. The project is using:\n\n* [shadow-cljs](https://github.com/thheller/shadow-cljs) for building/compiling and hot reloading ClojureScript.\n* [Reagent](https://reagent-project.github.io/) - a most excellent ReactJS wrapper.\n\n## Install\n\n1. Have Node.js installed (also in WSL, if you are using that)\n1. Copy the project template to your machine\n1. In the project root: install npm dependencies\n\n   ```\n   npm i\n   ```\n\n## Start the REPL\n\n1. Open the project in your favorite editor with Clojure support, here assuming it is VS Code with [Calva](https://calva.io/)\n1. Start the REPL:\n   1. Issue the VS Code command: **Calva: Start a project REPL and Connect (a.k.a. Jack-in)**\n   1. Select the project type: **shadow-cljs**\n   1. Select to start the `:app` build (note, you need to tick the checkbox)\n      * The Jack-in Terminal opens, showing the progress, when the app build is complete, you'll get a prompt asking for which build to concect to.\n   1. Select to connect to the `:app` build\n   1. Open the app in the browser on \u003chttp://localhost:8700\u003e\n\nYou should see something like this:\n\n![](./shadow-app-running.jpg)\n\nThe ClojureScript REPL is now running in your browser and Calva is connected to it.\n\n## Hack\n\nThe REPL isn't quite ready to use until you have loaded a file.\n\n1. Open [src/main/core.cljs](src/main/core.cljs)\n1. Issue the VS Code command: **Calva: Load/Evaluate Current File and Dependencies**\n\nEvaluate some string in file to see that the REPL is working. There is a Rich Comment at the bottom of the file you can use for this as well.\n\n## shadow-cljs hot reload\n\nThe browser app is encouraging you to edit it. In the file you loaded, [./src/main/core.cljs](./src/main/core.cljs), you'll find the strings. Try edit one of them and then save the file. Check the browser again. This is shadow-cljs doing its hot-reload thing.\n\n## Learn Calva and Clojure basics\n\nIf you are new to Calva and/or Clojure, please consider opening a new VS Code window and issue the VS Code command: **Calva: Fire up the Getting Started REPL**. See [https://calva.io/getting-started/#theres-a-getting-started-repl](https://calva.io/getting-started/#theres-a-getting-started-repl) for what to expect.\n\nMore beginner resources:\n\n* [Learn ClojureScript](https://www.learn-clojurescript.com/)\n* [A collection of Clojure learning materials](https://gist.github.com/ssrihari/0bf159afb781eef7cc552a1a0b17786f)\n\n## Ask for help\n\n* Please join the [Clojurians Slack](http://clojurians.net) to get help getting started. Some channels to visit/join:\n  * `#beginners`\n  * `#clojurescript`\n  * `#shadow-cljs`\n  * `#reagent`\n  * `#calva`\n* Friendly help also available at [ClojureVerse](https://clojureverse.org/)\n\nHappy hacking!\n","funding_links":["https://github.com/sponsors/PEZ"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpez%2Fshadow-bare-bones","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpez%2Fshadow-bare-bones","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpez%2Fshadow-bare-bones/lists"}