cljsjs

PB 2017-02-21T16:26:42.001052Z

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

juhoteperi 2017-02-21T16:45:45.001054Z

@petr The gun-js repo contains minfied file, that should be used instead of minifying in cljsjs side

PB 2017-02-21T16:46:26.001055Z

Hi @juhoteperi it does indeed. but you'll find that the releases don't yet have that file

juhoteperi 2017-02-21T16:46:27.001056Z

oh, but the latest release doesn't have the minified file

PB 2017-02-21T16:46:36.001057Z

I suspect that the next release will have it

juhoteperi 2017-02-21T16:47:08.001058Z

well, I'd suggest just leaving minified file out for now

PB 2017-02-21T16:48:00.001059Z

OK. So just calling download twice? As I noticed sift doesn't have a copy fn

PB 2017-02-21T16:48:20.001060Z

Alternatively one could use io/copy

juhoteperi 2017-02-21T16:48:34.001061Z

Ah, no need, you don't need to provide the minified file at all, it is optional

PB 2017-02-21T16:48:50.001062Z

Oh? Does the production directory not need to exist?

juhoteperi 2017-02-21T16:49:12.001063Z

Yes, it doesn't need to exist

PB 2017-02-21T16:49:16.001064Z

OK then

PB 2017-02-21T16:49:19.001065Z

I'll make that change

juhoteperi 2017-02-21T16:49:24.001066Z

Normal file will be used for optimized builds if minified file doesn't exist

PB 2017-02-21T16:50:04.001068Z

AH ok. I have updated the PR

juhoteperi 2017-02-21T16:50:24.001069Z

Interestingly NPM has release 0.6.3

juhoteperi 2017-02-21T16:50:37.001070Z

perhaps they are just not tagging releases in github anymore

juhoteperi 2017-02-21T16:51:11.001071Z

https://unpkg.com/gun@0.6.3/ you could download the gun.js and gun.min.js from here

juhoteperi 2017-02-21T16:51:58.001072Z

unpkg follows the npm versions so using it is perfectly fine, it is used for example by React package

PB 2017-02-21T17:04:06.001081Z

@juhoteperi I didn't know that. I'll use that

PB 2017-02-21T17:32:20.001082Z

@juhoteperi https://github.com/cljsjs/packages/pull/1007 appears to be correct now!

juhoteperi 2017-02-21T17:32:38.001084Z

@petr You also generated the externs against the new version?

PB 2017-02-21T17:32:45.001085Z

I did indeed

juhoteperi 2017-02-21T17:32:53.001086Z

Okay, I'll merge it once CI is finished

PB 2017-02-21T17:32:57.001087Z

Thanks!

juhoteperi 2017-02-21T17:37:11.001090Z

@petr Thank you for the contribution 🙂

PB 2017-02-21T17:37:18.001091Z

No, thank you for the help