Skip to content

Commit

Permalink
follows up project rename
Browse files Browse the repository at this point in the history
  • Loading branch information
benedekfazekas committed Sep 22, 2014
1 parent 56dd66f commit 2030fa0
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# lein-source-deps
# MrAnderson

Dependencies as source: used as if part of the project itself.

Expand All @@ -10,7 +10,7 @@ Somewhat node.js & npm style dependency handling.

## Usage

Put `[lein-source-deps "0.1.0-SNAPSHOT"]` into the `:plugins` vector of your project.clj.
Put `[thomasa/mranderson "0.1.0-SNAPSHOT"]` into the `:plugins` vector of your project.clj.

Additionally you also need to mark some of the dependencies in your dependencies vector in the project's `project.clj` with `^:source-dep` meta tag. For example:

Expand All @@ -33,7 +33,7 @@ The plugin basically retrieves the dependencies you marked (and their transitive

Yes, this is only half way. Now you can of course still work with your original source tree but the plugin also provides you a built in profile which enables you to work with the munged sourcetree including your dependencies. For example you can (and should) run your tests with the modified source tree:

$ lein with-profile plugin.lein-source-deps/config test
$ lein with-profile plugin.mranderson/config test

This does not stop here of course you can start up your repl with the modified source tree too of course.

Expand Down Expand Up @@ -65,6 +65,10 @@ A bit of additional magic happens when you use the built in profile: it actively

Some might argue that the clojure (and java) way of dependency handling is broken. Nonetheless what npm does for node.js namely nested, local dependencies just feels right. And altough javascript land is a different world the same can be used at least for certain projects in clojure as well. Perhaps not all but some projects, specially the ones related to tooling and commons like libraries which a lot of other projects are depending on. These can benefit from this style of dependency handling.

**MrAnderson?! Why?**

At the end he really gets back to the source, does not he?

## License

Copyright © 2014 Benedek Fazekas
Expand Down
4 changes: 2 additions & 2 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(defproject lein-source-deps "0.1.0-SNAPSHOT"
(defproject thomasa/mranderson "0.1.0-SNAPSHOT"
:description "Leiningen plugin to download and use some dependencies as source."
:url "http://example.com/FIXME"
:url "https://github.com/benedekfazekas/mranderson"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:eval-in-leiningen true
Expand Down
2 changes: 1 addition & 1 deletion src/leiningen/source_deps.clj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(ns leiningen.source-deps
(:require [lein-source-deps.util :refer [first-src-path clojure-source-files source-dep?]]
(:require [mranderson.util :refer [first-src-path clojure-source-files source-dep?]]
[cemerick.pomegranate.aether :as aether]
[me.raynes.fs :as fs]
[clojure.string :as str]
Expand Down
4 changes: 2 additions & 2 deletions src/lein_source_deps/plugin.clj → src/mranderson/plugin.clj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(ns lein-source-deps.plugin
(:require [lein-source-deps.util :refer [first-src-path clojure-source-files source-dep?]]
(ns mranderson.plugin
(:require [mranderson.util :refer [first-src-path clojure-source-files source-dep?]]
[clojure.tools.namespace.file :refer [read-file-ns-decl]]))

(defn- find-gen-class-ns [found file]
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lein_source_deps/util.clj → src/mranderson/util.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns lein-source-deps.util
(ns mranderson.util
(:require [clojure.java.io :as io])
(:import [java.io File]))

Expand Down

0 comments on commit 2030fa0

Please sign in to comment.