https://github.com/practicalli-johnny/practicalli-clojurescript-landing-to-archivepage
Landing Page for Practicalli for broadcasts, books and guides on Clojure, ClojureScript, Emacs, Spacemacs and more. Developed with ClojureScript and reagent, using figwheel.main
https://github.com/practicalli-johnny/practicalli-clojurescript-landing-to-archivepage
clojure clojure-cli clojurescript spacemacs
Last synced: 2 months ago
JSON representation
Landing Page for Practicalli for broadcasts, books and guides on Clojure, ClojureScript, Emacs, Spacemacs and more. Developed with ClojureScript and reagent, using figwheel.main
- Host: GitHub
- URL: https://github.com/practicalli-johnny/practicalli-clojurescript-landing-to-archivepage
- Owner: practicalli-johnny
- Archived: true
- Created: 2019-05-18T18:43:45.000Z (over 6 years ago)
- Default Branch: live
- Last Pushed: 2024-02-10T17:10:35.000Z (almost 2 years ago)
- Last Synced: 2025-05-19T20:18:07.379Z (7 months ago)
- Topics: clojure, clojure-cli, clojurescript, spacemacs
- Language: Clojure
- Homepage: https://practicalli.github.io/practicalli-clojurescript-landingpage/
- Size: 2.95 MB
- Stars: 19
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Practicalli Landing Page
The website brings together all the content created for the Practicalli series on Functional programming with Clojure.
## Overview
This web page was created with ClojureScript, reagent, figwheel-main and Bulma CSS framework.
The project was created with Leiningen build tool and using the figwheel-main template, with reagent option. A Clojure CLI tools configuration has also been added.
## Development
To get an interactive development environment run the following command in a terminal:
```shell
bin/repl
```
This script runs the following Clojure command, which can be used if aliases are added or changed
```shell
clojure -M:env/figwheel:build/dev
```
### Run via Spacemacs
Open one of the ClojureScript source code files, e.g. `src/practicalli/landing_page.cljs`
`, m s` to run `sesman-start` and select the `cider-jack-in-cljs` option
The `.dir-locals.el` configuration file sets the build tool to be `figwheel-main` and the build profile to be `dev` (loading the `dev.cljs.edn` build file)
### Clojure CLI
Open a terminal and run the following command to start a REPL
clojure -M:env/figwheel:build/dev
This will auto compile and send all changes to the browser without the need to reload. After the compilation process is complete, you will get a Browser Connected REPL. An easy way to try it is:
(js/alert "Am I connected?")
and you should see an alert in the browser window.
To clean all compiled files:
rm -rf target/public
Use the `:build/minify` for advanced compilation and a minified JavaScript file:
clojure -M:env/figwheel:build/minify
> The :env/fig:build/live build will write the generated javascript code in the `/docs/js/practicalli-landing-page.js` file.
## Running tests
TODO: add some tests
- check that the relevant sections are added
- check a section is returning the right form / structure
### Deploying to Test
Copy any changes in the following files and directories to the `/docs` directory:
- `resources/public/index.html`
- `resources/public/css`
- `resources/public/images`
Committing these files in the `/docs` directory will update [the test environment for this project](https://practicalli.github.io/practicalli.github.io/), allowing deployed changes to be viewed before pushing to live.
## Automated Deploy via GitHub Actions
`.github/workflows/deploy.yml` defines a GitHub Actions workflow to deploy on any commit to the `live` branch, including pull requests merged to that branch.
`clojure -M:env/figwheel:build/live` command is called to compile the ClojureScript code into an advanced compiled JavaScript file and written to the `docs` directory.
The GitHub Action deploys the contents of `docs` directory to the root of the `gh-pages` branch. The GitHub repository pages section is configured to serve content from the root of the `gh-pages` branch, enforcing https.
## License
Copyright © 2022 Practicalli
Distributed under the Creative Commons Attribution Share-Alike 4.0 International