Fork me on GitHub
#cljsjs
<
2017-02-21
>
PB16:02:42

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: ((lex) || (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

juhoteperi16:02:45

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

PB16:02:26

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

juhoteperi16:02:27

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

PB16:02:36

I suspect that the next release will have it

juhoteperi16:02:08

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

PB16:02:00

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

PB16:02:20

Alternatively one could use io/copy

juhoteperi16:02:34

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

PB16:02:50

Oh? Does the production directory not need to exist?

juhoteperi16:02:12

Yes, it doesn't need to exist

PB16:02:16

OK then

PB16:02:19

I'll make that change

juhoteperi16:02:24

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

PB16:02:04

AH ok. I have updated the PR

juhoteperi16:02:24

Interestingly NPM has release 0.6.3

juhoteperi16:02:37

perhaps they are just not tagging releases in github anymore

juhoteperi16:02:11

https://unpkg.com/[email protected]/ you could download the gun.js and gun.min.js from here

juhoteperi16:02:58

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

PB17:02:06

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

juhoteperi17:02:38

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

PB17:02:45

I did indeed

juhoteperi17:02:53

Okay, I'll merge it once CI is finished

PB17:02:57

Thanks!

juhoteperi17:02:11

@petr Thank you for the contribution 🙂

PB17:02:18

No, thank you for the help