FieryCod / holy-lambda

The extraordinary simple, performant, and extensible custom AWS Lambda runtime for Clojure.
https://fierycod.github.io/holy-lambda
MIT License
341 stars 20 forks source link

scaffold template fails if using qualified naming #47

Closed lowecg closed 3 years ago

lowecg commented 3 years ago

cli-new fails if using a fully qualified name

clj -X:new clj-new/create :template holy-lambda :name com.company/holy-lambda-example 
Generating fresh 'lein new' holy-lambda project.
Could not create directory /Users/lowecg/tmp/com.company/holy-lambda-example. Maybe it already exists?  See also :force or --force

Given the name used above, I'd expect the following project folder and src structure (amongst other files)

.
└── holy-lambda-example
    └── src
        └── com
            └── company
                └── holy_lambda_example.cljs

Example using figwheel-main template - also note the use of the getting started message, which is a nice touch.

$ clj -X:new clj-new/create :template figwheel-main :name com.company/holy-lambda-example 
Generating fresh figwheel-main project.
  To get started:
  -->  Change into the 'holy-lambda-example' directory
  -->  Start build with 'clojure -A:fig:build'

$ tree
.
└── holy-lambda-example
    ├── README.md
    ├── deps.edn
    ├── dev.cljs.edn
    ├── figwheel-main.edn
    ├── resources
    │   └── public
    │       ├── css
    │       │   └── style.css
    │       ├── index.html
    │       └── test.html
    ├── src
    │   └── com
    │       └── company
    │           └── holy_lambda_example.cljs
    ├── target
    │   └── public
    ├── test
    │   └── com
    │       ├── company
    │       │   └── holy_lambda_example_test.cljs
    │       └── test_runner.cljs
    └── test.cljs.edn

12 directories, 11 files
FieryCod commented 3 years ago

@lowecg Actually I think it should be since holy_lambda_example is name of the project not a filename.

  ├── src
    │   └── com
    │       └── company
    │           └── holy_lambda_example
    │               └── core.cljc

Fix has been deployed to clojars. Please retest :)