-
-
Notifications
You must be signed in to change notification settings - Fork 27
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: neil add shadow-cljs
#58
Comments
I'm using shadow-cljs in a couple of projects myself and I find |
I feel it's more the job of shadow itself to create such |
To add, I'm using shadow-cljs mostly for testing or producing libraries and publish them to NPM. So that doesn't align at all with the above proposal for example. |
@borkdude: I totally get where you're coming from. I should clarify that I want to solve a specific problem here: I believe ClojureScript is too hard to set up and use to build web apps in 2022. Disclaimer: This is just my opinion and I'm incredibly grateful for all the work that the community has provided to us for free. Nonetheless, there's glue that's often missing and my dissatisfaction with the developer experience motivates me to solve the problem however I can, whether that's through For example, understanding what goes in all those files above just to get started was an annoying process for me even though I've been writing ClojureScript professionally for 5+ years now. The steps need to be performed manually if you want to add these things to an existing project instead of starting from a template. I know people who could really enjoy ClojureScript but may not be able to get past all these little steps on their own. Anyways, rant over. This project is awesome and I want it to stay that way. With all this in mind, I see a few possible approaches for me to move forward:
Since this isn't really relevant to |
@rads I think a solution to the above could be a |
And perhaps host it with shadow-cljs so it can be used as |
Or we could still have a |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Rationale
I recently converted a project from figwheel-main to shadow-cljs and now have a pretty good understanding of the challenges when using these libraries in 2022. Though figwheel-main was working fine once I set it up, I ended up switching to shadow-cljs for more community support. That said, when setting up both build tools, I had to parse a lot of information to build a minimal but complete dev workflow that included a ClojureScript REPL, tests, CI, etc...
One option to make this easier now that
neil new
supports external templates would be to create a configurable shadow-cljs template, which is similar to the approach of frameworks like kit-clj. That's a totally valid approach and it's why I'm also working on a PR for kit-clj to add deps-new compatibility which will enable this top-down workflow withneil
.That said, the template approach doesn't work as well for adding shadow-cljs to an existing project. This is where
neil
has an opportunity to shine, providing a bottom-up workflow in addition to the top-down one. Beyond that, if we could have a tool that knows how to add shadow-cljs features incrementally with sane, modern defaults, this would be a boon to ClojureScript developers everywhere.Example
Requirements
Note: Due to the number of features in shadow-cljs, we may consider options within
neil add shadow-cljs
to generate only a subset of the features below (e.g.--karma-tests false
if you don't wantkarma.conf.js
).neil add shadow-cljs
should fill in the following files as needed:deps.edn
:shadow-cljs
alias using example from shadow-cljs tools.deps integration docs:extra-deps
to addshadow-cljs
dependencyshadow-cljs.edn
:deps true
to enable tools.deps integration:builds :app
with:target :browser
:builds :test
with:target :browser-test
:dev-http
to run tests from:builds :test
:builds :ci
with:target :karma
build.clj
bundle
functionuber
function to includebundle
package.json
andpackage-lock.json
:target :karma
shadow-cljs
npx shadow-cljs
command, but this is optional with tools.deps integrationkarma.conf.js
:test
build inshadow-cljs.edn
.gitignore
.shadow-cljs
directory.github/workflows/cljs-tests.yml
:ci
build on push tomain
The text was updated successfully, but these errors were encountered: