Giter VIP home page Giter VIP logo

practicalli / practicalli-clojurescript-landingpage Goto Github PK

View Code? Open in Web Editor NEW
19.0 2.0 1.0 3.02 MB

Landing Page for Practicalli for broadcasts, books and guides on Clojure, ClojureScript, Emacs, Spacemacs and more. Developed with ClojureScript and reagent, using figwheel.main

Home Page: https://practicalli.github.io/practicalli-clojurescript-landingpage/

Clojure 86.10% CSS 0.03% HTML 2.84% Emacs Lisp 0.63% Shell 0.10% Makefile 10.29%
clojure clojure-cli clojurescript spacemacs

practicalli-clojurescript-landingpage's Introduction

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:

bin/repl

This script runs the following Clojure command, which can be used if aliases are added or changed

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, 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

practicalli-clojurescript-landingpage's People

Contributors

practicalli-johnny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

practicalli-clojurescript-landingpage's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.