2

I would like a pointer to the proper way to name a project when invoking

lein new <projectname>

My question is related to a question I've asked recently.

Specifically, a lot of projects I have seen use dashes, like clojure-csv. Yet, I am having trouble getting a project to work on Windows.

So my specific question is is there a way to create the project when invoking lein new and what other adjustments in project.clj and core.clj should I expect to make when creating a Clojure project on Windows (in my case Windows 7) using lein?

Community
  • 1
  • 1
octopusgrabbus
  • 10,555
  • 15
  • 68
  • 131

2 Answers2

1

You can take inspiration form search into clojars.org like https://clojars.org/search?q=the.

The pattern seems to be namespace/name-with-dashes or name-with-dashes. For instance :

 cool-stuff
 stackoverflow/cool-stuff
 com.stackoverflow/cool-stuff

The recommended way to name namespaces is with a reverse domain like com.stackoverflow.subsection.

tomferon
  • 4,993
  • 1
  • 23
  • 44
  • Ok, so why is there a problem with my having dashes in the my namespace, directory-name, and so on? Refer to link in my OP. – octopusgrabbus Oct 04 '12 at 18:38
  • Try `lein new name-with-dashes` and writing files like https://gist.github.com/3839051. It is perfectly working and display `Hello` after `lein run` – tomferon Oct 05 '12 at 10:11
1

There is an "official"* ban on further projects who's name is a pun on the word Clojure... Please, this has to stop ;-) Specifically project names of the form verb+jure

  • so if your project does foo please do not name it foojure

existing projects like compojure (compose+jure) are cool because they predate this collective intention.

*not in any way official ;-)

Arthur Ulfeldt
  • 90,827
  • 27
  • 201
  • 284
  • Arthur Ulfeldt If dashes are OK, then why are they not (or seem not to be) OK on Windows? – octopusgrabbus Oct 04 '12 at 18:41
  • @octopusgrabbus, there's nothing wrong with dashes in Windows. Maybe you're trying to use filenames that match your namespace names? You can't do that for Clojure on any platform -- the filenames need to use underscores where the namespace names use dashes. – Charles Duffy Apr 09 '14 at 16:06