Skip to content

Commit

Permalink
rename cljsbuild-ui lein profile to cuttle
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunlebron committed Jan 19, 2015
1 parent 28872fb commit 167d1e7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions 00-scrap/kill-lein.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# This kills all cljsbuild-ui leiningen processes
# This kills all Cuttle leiningen processes
# We need this on Mac currently since "stop" is not killing them yet.

ps -ef | grep -v grep | grep "with-profile +cljsbuild-ui" | cut -d" " -f4 | xargs kill
ps -ef | grep -v grep | grep "with-profile +cuttle" | cut -d" " -f4 | xargs kill
4 changes: 2 additions & 2 deletions 00-scrap/list-lein.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# This kills all cljsbuild-ui leiningen processes
# This kills all Cuttle leiningen processes
# We need this on Mac currently since "stop" is not killing them yet.

ps -ef | grep -v grep | grep "with-profile +cljsbuild-ui"
ps -ef | grep -v grep | grep "with-profile +cuttle"
14 changes: 7 additions & 7 deletions add-lein-profile/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
# Add Lein Profile

This is a project that cljsbuild-ui uses to programmatically add a [leiningen profile]
to `~/.lein/profiles.clj`. This allows cljsbuild-ui to use lein
This is a project that Cuttle uses to programmatically add a [leiningen profile]
to `~/.lein/profiles.clj`. This allows Cuttle to use lein
plugins/dependencies across user projects without polluting their project.clj.

On startup, cljsbuild-ui effectively runs
On startup, Cuttle effectively runs

```
lein run '{:cljsbuild-ui {:plugins [[lein-pprint "1.1.1"]]}}'
lein run '{:cuttle {:plugins [[lein-pprint "1.1.1"]]}}'
```

so it can include these dependencies on any project with:

```
lein with-profile +cljsbuild-ui <command>
lein with-profile +cuttle <command>
```

## Details

We could inject plugins/dependencies into the `:user` profile which is included
by default on all projects. But we decided to avoid handling potential
collisions by creating our own profile `:cljsbuild-ui`, which is what this tool
collisions by creating our own profile `:cuttle`, which is what this tool
helps us do.

The plus sign in `lein with-profile +cljsbuild-ui` indicates that it is adding
The plus sign in `lein with-profile +cuttle` indicates that it is adding
to (rather than overwriting) the default profiles.

[leiningen profile]: https://github.com/technomancy/leiningen/blob/master/doc/PROFILES.md
4 changes: 2 additions & 2 deletions src-cljs/cuttle/exec.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
(defn lein
"Make lein command string"
[args]
(str (lein-path) " with-profile +cljsbuild-ui " args))
(str (lein-path) " with-profile +cuttle " args))

;;------------------------------------------------------------------------------
;; Require Modules
Expand Down Expand Up @@ -54,7 +54,7 @@

(def lein-profile
"Lein profile containing dependencies required for our tool."
'{:cljsbuild-ui {:plugins [[lein-pprint "1.1.1"]]}})
'{:cuttle {:plugins [[lein-pprint "1.1.1"]]}})

(defn add-lein-profile!
"Adds our Lein profile to the user's global profiles.clj."
Expand Down

0 comments on commit 167d1e7

Please sign in to comment.