• Stars
    star
    102
  • Rank 335,584 (Top 7 %)
  • Language
    Clojure
  • Created about 10 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Example application using boot, boot-cljs, boot-cljs-repl, and boot-reload.

boot-cljs-example Build Status

Example project using the boot build tool with the boot-cljs, boot-cljs-repl, and boot-reload tasks.

Prepare

Install boot. Then, in a terminal:

boot -u

This will update boot to the latest stable release version. Since boot is pre-release software at the moment, you should do this frequently.

Build

In a terminal do:

boot serve -d target/ watch speak reload cljs-repl cljs -sO none

This builds a pipeline for your project:

  • serve Starts a local web server. This task comes from the pandeiro/boot-http library.

    • -d Use target/ as the document root
  • watch Starts incremental build loop. Project will be rebuilt when source files change.

  • speak Audible notification (plays a sound file) for each build iteration, notifying of errors or warnings when appropriate.

  • reload Starts live-reload websocket server and connects browser client to it. Resources (stylesheets, images, HTML, JavaScript) in the page are reloaded when they change.

  • cljs Compiles ClojureScript namespaces to JavaScript.

    • -s Create source maps for compiled JavaScript files.
    • -O none Use optimizations none (no GClosure compiler pass).

You can view the generated content by opening http://localhost:3000/index.html in your browser.

OutOfMemoryError Troubleshooting

boot provides a tool called pods that make it possible for multiple independent Clojure classpaths to exist in the same JVM. Task authors can use Maven dependencies without worrying about shadowing or otherwise interfering with the dependencies in other pods.

One downside of pods is that their use results in higher-than-usual memory consumption by the JVM, particularly PermGen.

If you are using Java 7, you may see errors related to PermGen. You can consult the JVM Options wiki page for settings that can help.

You may also consider upgrading to Java 8, as it resolves many PermGen-related issues.

Start Browser REPL

With the build pipeline humming in the background, you can connect to the running nREPL server with either your IDE or at the command line in a new terminal:

boot repl --client

Then, you can start a CLJS REPL:

boot.user=> (start-repl)

Reload the page in your browser. Your REPL is now connected to the page.

License

Copyright © 2014 Adzerk

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

More Repositories

1

boot-reload

Boot task providing live-reload of browser css, images, etc.
Clojure
87
star
2

boot-cljs-repl

Boot task providing a REPL for ClojureScript development.
Clojure
72
star
3

env

Clojure / ClojureScript environment configuration library.
Clojure
54
star
4

bootlaces

Adzerk's boot configurations for Clojure libraries
Clojure
44
star
5

boot-test

Boot task for running clojure.test tests
Clojure
33
star
6

boot-beanstalk

Boot task to manage deployment of artifacts to Amazon Elastic Beanstalk
Clojure
31
star
7

cljs-console

ClojureScript console logging macros
Clojure
29
star
8

splint.js

Functional first-aid for JavaScript/jQuery code
Clojure
23
star
9

boot-bookmarklet

A Boot task for generating bookmarklets from ClojureScript namespaces
Clojure
21
star
10

boot-clj-docker-image

A Docker image with Oracle Java 8 and the latest version of Boot
16
star
11

boot-uberjar-example

Example Clojure project using boot to make an executable uberjar
Clojure
15
star
12

boot-jar2bin

A Boot task to create standalone executable binaries
Clojure
11
star
13

boot-logservice

Carefree SL4J/Logback logging in boot projects
Clojure
10
star
14

statsd-client

Clojure
6
star
15

docker-s3-cache

Docker image with Varnish cache for use in Elastic Beanstalk, caching sites deployed on S3.
Shell
6
star
16

boot-ubermain

Experimental uberjar packaging tasks for Boot
Java
4
star
17

ados-explainer-chrome-extension

Extended debug info for Ados requests in developer console.
JavaScript
3
star
18

boot-template

StringTemplate task for Boot
Clojure
3
star
19

adzerk-clj

A Clojure wrapper library for the Adzerk API
Clojure
3
star
20

zerkdown

Extensible abstract markdown to s-expression parser macro for ClojureScript.
Clojure
3
star
21

S3DatadogLambda

Pipe S3 activity into Datadog
JavaScript
2
star
22

boot-clj-minimal-docker-image

Minimal docker image with boot.
Shell
2
star
23

boot-aws-lambda

WIP Boot task for AWS Lambda
Java
2
star
24

clj-github-docs

Generate API docs for Clojure namespaces to include in GitHub repos.
Clojure
2
star
25

kinesis-adapter

Downloads log files from S3 and writes the records to Kinesis streams.
Clojure
1
star
26

dynamo-data-formatter

a tool for formatting data to be imported into DynamoDB
Clojure
1
star
27

zerkenv

A simple CLI tool for managing shared environment variables via Amazon S3
Shell
1
star