eginez / calvin

A minimalistic build tool for clojurescript projects that does not require the jvm
186 stars 9 forks source link

start modeling a tool based on boot, gulp, gradle instead of lein #5

Open eginez opened 7 years ago

arichiardi commented 7 years ago

I would definitely take inspiration from boot about task options: https://github.com/boot-clj/boot/wiki/Task-Options-DSL

arichiardi commented 7 years ago

So I have had this idea for a while, what if we specify tasks and their options with data? I am trying to push this in boot as well, but, I think it would be valuable in any (clojure) build tool.

This is what is looks like (I have a macro ready for parsing this and creating boot tasks, but of course it would need some change for calvin tasks).

eginez commented 7 years ago

that's an interesting idea. How do you envision we would share configurations from different tasks, when one or more keys need to be different, would there be any sort of inheritance/reuse?

arichiardi commented 7 years ago

Basically at the moment there is one simple convention: a key in the shared conf contains options for the task it names. Every task is passed the content of the map.

If tasks have same options you will have a shared var (see env which is shared in there). This is also good because you can share with tasks that have different option names but accept basically the same thing (: dependency vs :dependencies).

arichiardi commented 7 years ago

I think this is what we were looking for 😀 https://github.com/juxt/mach

eginez commented 7 years ago

In essence yes. I think it's a good idea to follow the target/task philosophy. However one of my goals is to have a pure cljs compiler and the above project seems to be relying on the jvm to do the actual build?. But overall I like your idea of have options for each task and the developer can create new tasks or use the core ones

eginez commented 7 years ago

FYI I just pushed a branch where I am using the bootstrapped compiler to compile very simple forms, so far so good, however I am still researching if we are going to need to use this https://github.com/google/closure-compiler-js

arichiardi commented 7 years ago

No the project above is a build tool using Lumo essentially and pure ClojureScript on node. I have not played with it yet, I will report back 😀

That or Calvin, plus a robust Huckleberry and that's your goal (and mine) right there right? -- Sent from my Android device with K-9 Mail. Please excuse my brevity.

eginez commented 7 years ago

right building clojurescript without relying on the java . Sounds good let me know how it goes