• Stars
    star
    248
  • Rank 163,560 (Top 4 %)
  • Language
    HTML
  • Created over 11 years ago
  • Updated over 2 years ago

Reviews

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

Repository Details

Leiningen 2 project template with tools.namespace, profiles, and user.clj

reloaded

A Leiningen 2 template to generate project skeletons using tools.namespace, Component, and component.repl.

This template is based on the blog article My Clojure Workflow, Reloaded.

Releases and Dependency Information

This template requires Leiningen 2.

I publish releases to Clojars.

Current release is 0.5.0

No installation is necessary; Leiningen should automatically discover and download the template.

Quick Start

In your shell:

lein new reloaded com.example/my-project cd my-project lein repl

At the REPL prompt:

(go)

This will load and switch to the dev namespace.

As you work, reload/restart your system from the dev namespace:

(reset)

Edit dev/dev.clj. Define a constructor for your application in the placeholder in dev-system.

Details

Run lein new reloaded com.example/new-project to generate a new project skeleton in the new-project directory, with a structure like this:

.
β”œβ”€β”€ README.md
β”œβ”€β”€ project.clj
β”œβ”€β”€ dev
β”‚Β Β  └── dev.clj
β”‚Β Β  └── user.clj
└── src
    └── com
        └── example
            └── new_project.clj

The src directory contains your application source files.

The dev directory contains files that you will use only during interactive development, including:

  • dev.clj, with template functions to create your application.

  • user.clj, loaded automatically by Clojure at startup.

These files will not be packaged in the JAR files created by lein jar or lein uberjar.

The user namespace refers the go, reset, and dev symbols from the com.stuartsierra.component.user-helpers namespace, which is packaged with component.repl. In user-helpers, reset is just an alias for go, so that you can use type the same thing regardless of whether the REPL is in user or dev.

The dev namespace refers common Clojure utilities and the reset, start, stop, and system symbols from the com.stuartsierra.component.repl namespace.

See component.repl and the original article for explanations of how I use these files to develop an application. Note: The article was written before the existence of Component and component.repl.

Change Log

  • Version 0.5.0 released on 2017-03-12
    • Upgrade component.repl to 0.2.0
    • Refer user-helpers from component.repl instead of inline definitions in user.clj
  • Version 0.4.0 released on 2017-03-01
    • Add test directory to created project
    • Add CHANGELOG to created project
  • Version 0.3.1 released on 2017-02-27
    • Fix: dev requires clojure.tools.logging but it is not a dependency
  • (BROKEN) Version 0.3.0 released on 2017-02-27
  • Version 0.2.1 released on 2015-09-19
    • Fix mis-named go symbol in dev namespace
  • (BROKEN) Version 0.2.0 released on 2015-09-19
    • Move start/stop functions into dev namespace
    • Update tools.namespace & Clojure versions
  • Version 0.1.3 released on 2014-10-04
    • Update tools.namespace dependency in template
  • Version 0.1.2 released on 2014-07-18
    • Update Clojure & tools.namespace dependencies in template
  • Version 0.1.1 released on 2013-10-21
    • Do not assume EPL or any other license in generated project
  • Version 0.1.0 released on 2013-08-05

Forking

I created this template for my own personal use, and I am publishing it in the hopes that others will find it useful. I encourage you to fork and modify this template to suit your own needs and personal workflow, but I am unlikely to merge any changes into this repository.

Copyright and License

Copyright Β© 2013-2017 Stuart Sierra. All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public License 1.0 which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.

More Repositories

1

component

Managed lifecycle of stateful objects in Clojure
Clojure
2,086
star
2

dependency

A data structure for representing dependency graphs in Clojure
Clojure
222
star
3

lazytest

(archived) New test framework for Clojure
Clojure
162
star
4

clojure-hadoop

Library to aid writing Hadoop jobs in Clojure.
Clojure
157
star
5

class-diagram

Generate & display class hierarchy diagrams for Java classes
Clojure
112
star
6

cljque

(archived) experiments with event streams in Clojure
Clojure
80
star
7

flow

(archived) Function definitions derived from graph declarations.
Clojure
78
star
8

frequencies

Basic statistical computations on frequency maps (histograms) in Clojure
Clojure
72
star
9

mapgraph

Basic in-memory graph database of maps with links
Clojure
66
star
10

dotfiles

my configuration files
Emacs Lisp
53
star
11

parallel-async

Examples of parallel processing with Clojure's core.async
Clojure
50
star
12

component.repl

Development utilities for the Component framework
Clojure
50
star
13

log.dev

Quick-start logging setup for Java or Clojure development
Clojure
43
star
14

clojure-rdf

(archived) RDF-manipulation library for Clojure
Clojure
34
star
15

validate

(archived) Composable data validation functions
Clojure
22
star
16

stacktrace.raw

Undo the effect of Clojure stacktrace pretty-printers
Clojure
20
star
17

clojure-archetype

Maven 2 archetype for Clojure projects
Clojure
17
star
18

clojure.walk2

Reimplementation of clojure.walk with protocols
Clojure
14
star
19

altlaw-backend

Back-end and web site code for www.altlaw.org
Clojure
13
star
20

devbox

Provisioning scripts for my personal development workstation
Shell
13
star
21

need

(archived) Clojure 'need' macro to replace use/require/refer
Clojure
11
star
22

classpath-manager

(archived) Nailgun add-on to run Java classes with configurable classpath
Java
11
star
23

hadoop-maven

(archived) Maven 2 POMs for Apache Hadoop projects
10
star
24

find-on-github

Emacs functions to open current file on GitHub.com
Emacs Lisp
10
star
25

password-store

My fork of 'pass' from http://www.passwordstore.org/
Shell
8
star
26

pairhost

(archived) EC2 remote pairing development environment
Shell
8
star
27

component.pedestal

Pedestal web server wrapper for Component systems
Clojure
8
star
28

org-mode

My copy of the org-mode repo
Emacs Lisp
7
star
29

cljs-formatter

(archived) ClojureScript pretty-printer that utilizes the DOM
Clojure
6
star
30

new-clojure-maven-plugin

(archived) leaner, meaner Clojure Maven plugin
Java
5
star
31

altlaw-pdf

PDF-to-HTML conversion for www.altlaw.org
C++
4
star
32

altlaw-clojure-restlet

Clojure/Restlet integration for AltLaw.org
Clojure
2
star
33

altlaw-vocab

RDF vocabulary for AltLaw.org
2
star
34

pedestal-test-sse-close

Test case for when client closes Pedestal SSE connection
Clojure
1
star
35

altlaw-template

StringTemplate-based rendering library for AltLaw
Clojure
1
star
36

altlaw-crawler

HTTP Web crawler for AltLaw.org
Clojure
1
star
37

clojure-time-trials

(archived) Performance tests for different programming techniques in Clojure
Clojure
1
star
38

buildtest

Testing Maven / Hudson build & release process for Clojure & contrib libraries
1
star
39

altlaw-extract

Data extraction / parsing code for AltLaw.org
Java
1
star
40

altlaw-jruby

Custom JRuby build for AltLaw.org
1
star
41

altlaw-parent

Parent POM for Maven 2 builds of AltLaw projects
1
star