Permalink
Browse files

Add a warning under project-specific tasks.

  • Loading branch information...
1 parent a1d4a0f commit 72e69087780cc177b10eca2ad548e69dc74c97de @technomancy committed Sep 11, 2012
Showing with 26 additions and 21 deletions.
  1. +26 −21 doc/PLUGINS.md
View
@@ -80,27 +80,6 @@ Often more complicated tasks get divided up into subtasks. Placing
`:subtasks` metadata on a task defn which contains a vector of subtask
vars will allow `lein help $TASK_CONTAINING_SUBTASKS` to list them.
-### Project-specific Tasks
-
-Occasionally, the need arises for a task specific to a project, so
-that, for example, `lein foo` is available from within that project's
-repo without a `lein install` or dependency download. To enable this
-behavior, place the `foo.clj` file defining the new task in
-`tasks/leiningen/` and add `tasks` to your `.lein-classpath`:
-
-```
-$ ls
-README.md project.clj src tasks test
-$ ls -R tasks
-leiningen
-
-tasks/leiningen:
-foo.clj
-$ echo -ne ":tasks" | cat >> .lein-classpath
-$ lein foo
-Hello, Foo!
-```
-
## Code Evaluation
Plugin functions run inside Leiningen's process, so they have access
@@ -351,6 +330,32 @@ argument to see if it's a project map, but if you have more than two
arities this can get very tricky; it may just be better to maintain
separate branches of your codebase in this situation.
+### Project-specific Tasks
+
+Occasionally, the need arises for a task specific to a project, so
+that, for example, `lein foo` is available from within that project's
+repo without a `lein install` or dependency download. To enable this
+behavior, place the `foo.clj` file defining the new task in
+`tasks/leiningen/` and add `tasks` to your `.lein-classpath`:
+
+```
+$ ls
+README.md project.clj src tasks test
+$ ls -R tasks
+leiningen
+
+tasks/leiningen:
+foo.clj
+$ echo -ne ":tasks" | cat >> .lein-classpath
+$ lein foo
+Hello, Foo!
+```
+
+Note that in most cases it's better to spin off tasks into their own
+plugin projects; using `.lein-classpath` is mainly appropriate for
+experimentation or cases when there isn't enough time to create a
+proper plugin.
+
## Templates
You can also publish templates for generating project skeletons that

0 comments on commit 72e6908

Please sign in to comment.