Hey all. I'm trying to create a cljsjs package ( https://github.com/cljsjs/packages/pull/1007 ). However, when trying to minify file for production use I'm getting the following error:
Minifying gun.inc.js
Feb 21, 2017 11:02:26 AM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: /home/peter/.boot/cache/tmp/home/peter/code/cljs-packages/gun/erw/u2qisy/cljsjs/gun/development/gun.inc.js:676: ERROR - Parse error. IE8 (and below) will parse trailing commas in array and object literals incorrectly. If you are targeting newer versions of JS, set the appropriate language_in option.
lex: (<http://Gun.text.is|Gun.text.is>(lex) || <http://Gun.num.is|Gun.num.is>(lex))? Gun.is.rel.ify(lex) : lex,
^
Sifting output files...
I'm not really sure what to do. Would someone point me in the right direction.
I have looked at specifying the language_in
option, however literally none of the other cljsjs projects do this. So I'm not sure that it's the correct direction@petr The gun-js repo contains minfied file, that should be used instead of minifying in cljsjs side
Hi @juhoteperi it does indeed. but you'll find that the releases don't yet have that file
oh, but the latest release doesn't have the minified file
I suspect that the next release will have it
well, I'd suggest just leaving minified file out for now
OK. So just calling download
twice? As I noticed sift doesn't have a copy
fn
Alternatively one could use io/copy
Ah, no need, you don't need to provide the minified file at all, it is optional
Oh? Does the production directory not need to exist?
Yes, it doesn't need to exist
OK then
I'll make that change
Normal file will be used for optimized builds if minified file doesn't exist
AH ok. I have updated the PR
Interestingly NPM has release 0.6.3
perhaps they are just not tagging releases in github anymore
https://unpkg.com/gun@0.6.3/ you could download the gun.js and gun.min.js from here
unpkg follows the npm versions so using it is perfectly fine, it is used for example by React package
@juhoteperi I didn't know that. I'll use that
@juhoteperi https://github.com/cljsjs/packages/pull/1007 appears to be correct now!
@petr You also generated the externs against the new version?
I did indeed
Okay, I'll merge it once CI is finished
Thanks!
@petr Thank you for the contribution 🙂
No, thank you for the help