Skip to content

A short series of tutorials on ClojureScript

Notifications You must be signed in to change notification settings

agofilo/modern-cljs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

modern-cljs

A series of tutorials to guide you in creating and setting up ClojureScript (CLJS) projects.

Introduction

This series of tutorials will guide you in creating, setting up and running simple CLJS projects. The series follows a progressive enhancement of projects themselves.

Assuming you already have installed leiningen 2, to run the last available tutorial without coding:

  1. $ git clone https://github.com/magomimmo/modern-cljs.git
  2. $ cd modern-cljs/compiler
  3. $ git clone https://github.com/magomimmo/clojurescript.git
  4. $ cd clojurescript
  5. $ ./script/bootstrap
  6. $ cd ../..
  7. $ lein ring server
  8. open a new terminal and cd in modern-cljs
  9. $ lein cljsbuild once
  10. $ lein trampoline cljsbuild repl-listen
  11. visit login-dbg.html and/or shopping-dbg.html
  12. play with the repl connected to the browser

NOTE: If you want to access the code of any single tutorial because you don't want to copy&paste it or you don't want to write it yourself, do as follows:

  • $ git clone https://github.com/magomimmo/modern-cljs.git (if you have not already done);
  • $ cd modern-cljs
  • $ git checkout tut-01 # for tutorial 1, tut-02 for tutorial 2 etc.

That said, I suggest coding yourself the content of the tutorials. In my experience is always the best choice if you are not already fluent in the programming language you have under your fingers.

In the first tutorial you are going to create and configure a very basic CLJS project.

In this tutorial you are going to set up a browser connected CLJS REPL (bRepl) using an external http-server.

In this tutorial you are going to substitute the external http-server with ring, a CLJ based http-server.

In this tutorial we start having some fun with CLJS form validation, by porting from JS to CLJS the login form example of Modern Javascript: Development and desing by Larry Ullman.

In this tutorial we're going to use domina library to make our login form validation more clojure-ish.

In this tutorial we're going to investigate and solve in two different ways the not so nice issue we met in the last tutorial.

In this tutorial we're going to explore CLJS/CLS compilation modes by using the usual lein-cljsbuild plugin of leiningen, but we'll discover a trouble we do not know how to manage yet.

In this tutorial we're going to patch CLJS compiler for solving the code duplication trouble we met in the previous tutorial.

In this tutorial we're going to illustrate the clojure testing tool using the patched CLJS compiler as a true and real-life case.

In this tutorial we're going to finish the work started in the previus one by introducing mocks to manage the tests of CLJS compiler in the mutable world of the file system.

Tutorial 11 - TO BE DONE

TO BE DONE

Appendices

In this section of the series I'll collect any content that would have weighted down any individual tutorials.

Appendix A - TBD

TO BE DONE

Appendix B - TBD

TO BE DONE

Appendix C - TBD

TO BE DONE

Appendix X - TBD

TO BE DONE

License

Copyright © Mimmo Cosenza, 2012. Released under the Eclipse Public License, the same as Clojure.

About

A short series of tutorials on ClojureScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published