Hi,
Now, when write a app with cljs and compile with shadow-cljs, i need to copy files from https://github.com/thheller/reagent-react-native , can shadow-cljs support a command to create a template like re-natal, so it'll be easily for develop react-native app with cljs and shadow-cljs
Currently there is no built-in template mechanism. I'm still planning one but wasn't too happy with the options so far.
@thheller is there any plan to support template?
Yes.
@thheller i think shadow-cljs now need a template system like lein or re-natal urgently, many people like me do not know how to integrate shadow-cljs with others like react-native or ant design锛宨f there is a template system, it'll save a lot of time.
... many people like me do not know how to integrate shadow-cljs with others like react-native or ant design
I don't think that templates are good solution to that problem. Better and more docs solve that problem. react-native in particular is not documented well enough (because its relatively new). antd doesn't require any documentation since it is literally npm install antd and then works like any other JS library.
I don't use a whole lot of templates and every single one I have used generated more files than I needed that I end up deleting. So instead of creating 3 files manually I end up creating 10 automatically and deleting 7. shadow-cljs is optimized for CLJS development and will require a lot less files than a similar project would need using clj + cljs.main (or figwheel.main).
I started writing create-cljs-project as a quick template utility. See the Quick Start as an example. Ideally that should be able to generate some basic example sources/configs as well.
Simply put I don't have enough time to do templates by myself. If someone wants to help out writing templates I'll happily help integrate that.
you are right, i can create template using create-cljs-project in deed.
In case of react-native you are better off with react-native init and then npm install shadow-cljs + npx shadow-cljs init.
I'll leave this open and see if someone feels the urge to work on templates.
Most helpful comment
I don't think that templates are good solution to that problem. Better and more docs solve that problem.
react-nativein particular is not documented well enough (because its relatively new).antddoesn't require any documentation since it is literallynpm install antdand then works like any other JS library.I don't use a whole lot of templates and every single one I have used generated more files than I needed that I end up deleting. So instead of creating 3 files manually I end up creating 10 automatically and deleting 7.
shadow-cljsis optimized for CLJS development and will require a lot less files than a similar project would need usingclj+cljs.main(orfigwheel.main).I started writing
create-cljs-projectas a quick template utility. See the Quick Start as an example. Ideally that should be able to generate some basic example sources/configs as well.Simply put I don't have enough time to do templates by myself. If someone wants to help out writing templates I'll happily help integrate that.