Skip to content
This repository
Browse code

Readme tweaks.

  • Loading branch information...
commit 2f3ede0964824216b57542595cfce19b8a4c4bde 1 parent 344a465
Phil Hagelberg authored April 12, 2012

Showing 2 changed files with 34 additions and 22 deletions. Show diff stats Hide diff stats

  1. 54  README.md
  2. 2  todo.org
54  README.md
Source Rendered
@@ -48,7 +48,7 @@ The
48 48
 has a detailed walk-through of the steps involved in creating a new
49 49
 project, but here are the commonly-used tasks:
50 50
 
51  
-    $ lein new NAME # generate a new project skeleton
  51
+    $ lein new [TEMPLATE] NAME # generate a new project skeleton
52 52
 
53 53
     $ lein test [TESTS] # run the tests in the TESTS namespaces, or all tests
54 54
 
@@ -56,9 +56,9 @@ project, but here are the commonly-used tasks:
56 56
 
57 57
     $ lein jar # package up the whole project as a .jar file
58 58
 
59  
-    $ lein install [NAME VERSION] # install a project
  59
+    $ lein install # install a project
60 60
 
61  
-    $ lein search ... # find jars for your project.clj dependencies
  61
+    $ lein search [TERM] # find jars for your project.clj dependencies
62 62
 
63 63
 Use `lein help` to see a complete list. `lein help $TASK` shows the
64 64
 usage for a specific task.
@@ -68,12 +68,8 @@ You can also chain tasks together in a single command by using commas:
68 68
     $ lein clean, test foo.test-core, jar
69 69
 
70 70
 Most tasks need to be run from somewhere inside a project directory to
71  
-work, but some (`new`, `help`, `search`, `version`, `repl`, and the
72  
-two-argument version of `install`) may run from anywhere.
73  
-
74  
-The install task places shell scripts in the `~/.lein/bin`
75  
-directory for projects that include them, so if you want to take
76  
-advantage of this, you should put it on your `$PATH`.
  71
+work, but some (`new`, `help`, `search`, `version`, and `repl`) may
  72
+run from anywhere.
77 73
 
78 74
 ## Configuration
79 75
 
@@ -98,16 +94,17 @@ You can also have user-level configuration that applies for all
98 94
 projects. The `~/.lein/init.clj` file will be loaded every time
99 95
 Leiningen launches; any arbitrary code may go there. This code is
100 96
 executed inside Leiningen itself, not in your project. Set the
101  
-`:repl-init` key in project.clj to point to a namespace if
102  
-you want code executed inside your project.
  97
+`:init-ns` key in `:repl-options` in project.clj to point to a
  98
+namespace if you want code executed inside your project in the repl.
103 99
 
104 100
 ### Profiles
105 101
 
106  
-You can change the configuration of your project by applying various
107  
-profiles. For instance, you may want to have a few extra test data
108  
-directories on the classpath during development without including them
109  
-in the jar, or you may want to have Swank Clojure available in every
110  
-project you hack on without modifying every single project.clj you use.
  102
+In Leiningen 2.x you can change the configuration of your project by
  103
+applying various profiles. For instance, you may want to have a few
  104
+extra test data directories on the classpath during development
  105
+without including them in the jar, or you may want to have Swank
  106
+Clojure available in every project you hack on without modifying every
  107
+single project.clj you use.
111 108
 
112 109
 By default the `:dev`, `:user`, and `:default` profiles are activated
113 110
 for each task. Each profile is defined as a map which gets merged into
@@ -131,6 +128,11 @@ active. In addition to `project.clj`, profiles specified in
131 128
                   [lein-pprint "1.1.1"]]}}
132 129
 ```
133 130
 
  131
+The difference between the profiles active by default is that the
  132
+`:default` profile comes with Leiningen, while the `:dev` profile is
  133
+meant to be specified in project.clj and the `:user` plugin goes in
  134
+your `~/.lein/profiles.clj` file.
  135
+
134 136
 Another use of profiles is to test against various sets of dependencies:
135 137
 
136 138
 ```clj
@@ -146,19 +148,23 @@ Another use of profiles is to test against various sets of dependencies:
146 148
 To activate other profiles for a given run, use the `with-profile`
147 149
 higher-order task:
148 150
 
149  
-    $ lein with-profile qa,1.3 test :database
  151
+    $ lein with-profile 1.3 test :database
150 152
 
151  
-Multiple profiles may be specified with commas:
  153
+Multiple profiles may be combined with commas:
152 154
 
153 155
     $ lein with-profile qa,user test :database
154 156
 
  157
+Multiple profiles may be executed in series with colons:
  158
+
  159
+    $ lein with-profile 1.3:1.4 test :database
  160
+
155 161
 A single `with-profile` call does not apply across task comma-chains.
156 162
 
157 163
 To see how a given profile affects your project map, use the
158 164
 [lein-pprint](https://github.com/technomancy/leiningen/tree/master/lein-pprint)
159 165
 plugin:
160 166
 
161  
-    $ lein pprint
  167
+    $ lein with-profile 1.4 pprint
162 168
     {:compile-path "/home/phil/src/leiningen/lein-pprint/classes",
163 169
      :group "lein-pprint",
164 170
      :source-path ("/home/phil/src/leiningen/lein-pprint/src"),
@@ -179,7 +185,7 @@ that modify behaivour of existing tasks. See
179 185
 for a full list. If a plugin is needed for successful test or build
180 186
 runs, (such as `lein-tar`) then it should be added to `:plugins` in
181 187
 project.clj, but if it's for your own convenience (such as
182  
-swank-clojure) then it should be added to the `:plugins` list in the
  188
+`swank-clojure`) then it should be added to the `:plugins` list in the
183 189
 `:user` profile from `~/.lein/profiles.clj`. The
184 190
 [plugin guide](https://github.com/technomancy/leiningen/blob/preview/doc/PLUGINS.md)
185 191
 explains how to write plugins.
@@ -200,7 +206,10 @@ explains how to write plugins.
200 206
 **Q:** What if my project depends on jars that aren't in any repository?  
201 207
 **A:** The [deploy guide](https://github.com/technomancy/leiningen/blob/preview/doc/DEPLOY.md)
202 208
   explains how to set up a private repository. If you are not sharing
203  
-  them with a team you could also just [install locally](https://github.com/kumarshantanu/lein-localrepo).
  209
+  them with a team you could also just
  210
+  [install locally](https://github.com/kumarshantanu/lein-localrepo).
  211
+  In general it's easiest to deploy them to a private S3 bucket with
  212
+  the [s3-wagon-private](https://github.com/technomancy/s3-wagon-private) plugin.
204 213
 
205 214
 **Q:** I want to hack two projects in parallel, but it's annoying to switch between them.  
206 215
 **A:** If you create a directory called `checkouts` in your project
@@ -235,7 +244,8 @@ explains how to write plugins.
235 244
 **Q:** I'm behind an HTTP proxy; how can I fetch my dependencies?  
236 245
 **A:** Set the `$http_proxy` environment variable in Leiningen 2.x.
237 246
   For Leiningen 1.x versions, see the instructions for
238  
-  [configuring a Maven proxy](http://maven.apache.org/guides/mini/guide-proxies.html).
  247
+  [configuring a Maven proxy](http://maven.apache.org/guides/mini/guide-proxies.html)
  248
+  using `~/.m2/settings.xml`.
239 249
 
240 250
 **Q:** What can be done to speed up launch?  
241 251
 **A:** The main delay involved in Leiningen comes from starting the
2  todo.org
Source Rendered
@@ -24,6 +24,8 @@ See also https://github.com/technomancy/leiningen/issues
24 24
    - [ ] Re-enable shell wrappers
25 25
 ** Complex
26 26
    - [ ] Force checking of snapshots
  27
+   - [ ] Allow jars to be signed.
  28
+   - [ ] Calculate web of trust for signed dependencies.
27 29
    - [ ] Prevent multiple versions of artifacts from getting added (#420)
28 30
    - [ ] Auto-clean predicates (profile switching, etc) (#468)
29 31
    - [ ] Honor hooks declared in plugin jar metadata? (#401)

0 notes on commit 2f3ede0

Please sign in to comment.
Something went wrong with that request. Please try again.