Fork me on GitHub
#cljsjs
<
2016-01-18
>
rohit12:01:42

Hello, is it possible to expose the language-in parameter for minify deftask? It is exposed in asset-minifier

rohit12:01:12

when i am using the task in a cljsjs package react-timer-mixin, I am getting an error

martinklepsch12:01:41

@rohit: I guess adding another option here and passing it to the minify task might be just what's needed: https://github.com/cljsjs/boot-cljsjs/blob/master/src/cljsjs/boot_cljsjs/packaging.clj#L138

martinklepsch12:01:29

Feel free to take a stab at it but also don't worry if you can't right now simple_smile

rohit12:01:40

i'll give it a go. cheers!

martinklepsch12:01:55

@rohit: ping me if you run into trouble

rohit12:01:08

@martinklepsch: will do. thanks!

martinklepsch12:01:35

@rohit: is the handling of the default value necessary? seems that asset-minifier would just handle it if a falsy value is supplied?

martinklepsch12:01:28

or does key destructuring check if the key exists and uses it even if it's nil? not sure tbh

rohit12:01:24

i think key destructuring checks for key existence

rohit12:01:47

i wasn't very sure about it. so i decided to explicitly set the default value

rohit12:01:47

According to this document, :or is used to assign a value if the key is missing. http://blog.jayfields.com/2010/07/clojure-destructuring.html

martinklepsch12:01:10

just tested on the repl

martinklepsch12:01:56

maybe an alternative would be to supply empty map if lang isn't set

martinklepsch12:01:07

but in any case this is good, thanks!

rohit12:01:35

i'll do that -> have an if clause to figure out the options

martinklepsch13:01:47

ok, ping me when you have it then I can cut a release

rohit13:01:53

@martinklepsch: thanks! i'll retract my PR on react-timer-mixin and just update the usage of minify task after bumping up boot-cljsjs