cljsjs

2016-09-13T05:49:11.000364Z

hello folks

2016-09-13T05:50:47.000366Z

i do not see these files after a boot package - am i doing something wrong?

flyboarder 2016-09-13T05:59:03.000367Z

@michael.heuberger Can you post the full boot file plz you url might be incorrect, "<https://github.com/dropbox/zxcvbn/archive/>“ +lib-version+ ".zip is what I think you want

flyboarder 2016-09-13T06:00:07.000368Z

you also want decompress true on the download task and remember to boot package install to put it into local maven

2016-09-13T21:56:57.000373Z

@flyboarder thanks for that. i thought it doesn’t have to be always zip and you can download the raw files. that’s not mentioned in https://github.com/cljsjs/packages/wiki/Creating-Packages

juhoteperi 2016-09-13T22:04:13.000375Z

It doesn't have to be always zip and raw files can be downloaded

2016-09-13T22:04:36.000376Z

oh, then that should be mentioned too with an example

juhoteperi 2016-09-13T22:05:23.000377Z

Though for example https://github.com/dropbox/zxcvbn/tree/4.3.0/dist is a HTML file so downloading that doesn't make any sense

juhoteperi 2016-09-13T22:05:48.000379Z

But https://raw.githubusercontent.com/dropbox/zxcvbn/4.3.0/dist/zxcvbn.js can be downloaded

2016-09-13T22:07:33.000380Z

thanks good to know - here an example what i have now with zip

2016-09-13T22:07:35.000382Z

(deftask package []
  (task-options! push {:ensure-branch nil})
  (comp
    (download
      :url (str "<https://github.com/dropbox/zxcvbn/archive/>" +lib-version+ ".zip")
      :unzip true)

    (sift :move {#"^dist/zxcvbn.js"     "cljsjs/zxcvbn/development/zxcvbn.js"
                 #"^dist/zxcvbn.js.map" "cljsjs/zxcvbn/development/zxcvbn.map.js"})

    (sift :move {#"^dist/zxcvbn.js"     "cljsjs/zxcvbn/production/zxcvbn.js"
                 #"^dist/zxcvbn.js.map" "cljsjs/zxcvbn/production/zxcvbn.map.js"})

    (sift :include #{#"^cljsjs"})
    (pom)

2016-09-13T22:07:53.000383Z

but then, the boot download task gives me a null pointer 😕

2016-09-13T22:08:36.000384Z

~/C/c/zxcvbn ❯❯❯ boot download                                                                                                                    feature/SCL-1580 ✱
    clojure.lang.ExceptionInfo:
    data: {:file
           "/var/folders/m7/r54_bcwj2ms2w5rpgdmvr6hh0000gn/T/boot.user7776919171751829255.clj",
           :line 19}
java.lang.NullPointerException:

flyboarder 2016-09-13T22:12:53.000390Z

@michael.heuberger: boot package what does that currently give you?

2016-09-13T22:13:11.000391Z

~/C/c/zxcvbn ❯❯❯ boot package                                                                                                                     feature/SCL-1580 ✱
Downloading 4.3.0.zip
Extracting 36 files
Sifting output files...
Sifting output files...
Sifting output files...
Writing pom.xml and pom.properties...
Writing zxcvbn-4.3.0-0.jar…

juhoteperi 2016-09-13T22:13:27.000393Z

you can't call boot download without parameters directly

2016-09-13T22:13:37.000394Z

ah

2016-09-13T22:14:06.000395Z

and where can i see the contents boot package is generating? it’s not in my current directory

juhoteperi 2016-09-13T22:14:10.000396Z

boot package doesn't currently print checksum error because you aren't using :checksum parameter with download task

juhoteperi 2016-09-13T22:14:25.000397Z

-> everything is valid

juhoteperi 2016-09-13T22:14:41.000398Z

to check the checksum, add for example empty checksum property :checksum ""

juhoteperi 2016-09-13T22:14:49.000399Z

it is not strictly necessary to check checksum

juhoteperi 2016-09-13T22:15:33.000400Z

> After running the package task in any CLJSJS package, the fileset contents should be as follows. You can check these by using show --fileset task or by writing fileset contents to a directory using target task.

2016-09-13T22:16:38.000402Z

ah, that :checksum “” tip is gold

juhoteperi 2016-09-13T22:17:09.000403Z

I have tried to explain in on the wiki: > If the :checksum option is empty string or incorrect, and error containing the real MD5 checksum is displayed and you can use this to fix the value.

2016-09-13T22:17:45.000404Z

yep, my bad

2016-09-13T22:18:10.000405Z

now, boot show —fileset still doesnt show me the new files

2016-09-13T22:18:14.000406Z

~/C/c/zxcvbn ❯❯❯ boot package                                                                                                                   ⏎ feature/SCL-1580 ✱
Downloading 4.3.0.zip
Extracting 36 files
Sifting output files...
Sifting output files...
Sifting output files...
Writing pom.xml and pom.properties...
Writing zxcvbn-4.3.0-0.jar...
~/C/c/zxcvbn ❯❯❯ boot show --fileset                                                                                                              feature/SCL-1580 ✱

└── cljsjs
    └── zxcvbn
        └── common
            └── zxcvbn.ext.js

juhoteperi 2016-09-13T22:19:03.000407Z

the archive file probably has all files prefixed under some directory, like zccvn-123/ so the regexes don't match any files

2016-09-13T22:19:28.000408Z

can i see this somewhere?

juhoteperi 2016-09-13T22:20:02.000409Z

you could for example add (sift :fileset true) task after download task

juhoteperi 2016-09-13T22:20:21.000410Z

oh and running boot show --fileset doesn't make sense

juhoteperi 2016-09-13T22:20:43.000411Z

each boot invocation/process is separate from another

2016-09-13T22:20:59.000412Z

sift: unknown option(s): :fileset

juhoteperi 2016-09-13T22:21:19.000413Z

sorry, (show :fileset true)

juhoteperi 2016-09-13T22:21:59.000414Z

for show --fileset to work, you'd need to run it as part of the same pipeline as package: boot package show --fileset

2016-09-13T22:22:15.000415Z

ah, that worked … now i can fix my regexes

2016-09-13T22:24:21.000416Z

does sift also support :copy instead of :move?

juhoteperi 2016-09-13T22:25:02.000418Z

Nope. (You can check the options with boot sift --help)

2016-09-13T22:25:02.000419Z

apparently not

2016-09-13T22:25:07.000420Z

(sift :copy {#"zxcvbn-4.3.0/dist/zxcvbn.js"     "cljsjs/zxcvbn/development/zxcvbn.js"
                 #"zxcvbn-4.3.0/dist/zxcvbn.js.map" "cljsjs/zxcvbn/development/zxcvbn.map.js"})

    (sift :move {#"zxcvbn-4.3.0/dist/zxcvbn.js"     "cljsjs/zxcvbn/production/zxcvbn.js"
                 #"zxcvbn-4.3.0.dist/zxcvbn.js.map" "cljsjs/zxcvbn/production/zxcvbn.map.js”})

2016-09-13T22:25:12.000421Z

how can i achieve something like this?

juhoteperi 2016-09-13T22:25:51.000422Z

no need to have the the same file duplicated

juhoteperi 2016-09-13T22:26:03.000423Z

production file is supposed to be the minifed file, but if you don't have one you can just skip it

2016-09-13T22:26:33.000424Z

will boot default to development folder if there is no production folder?

juhoteperi 2016-09-13T22:27:15.000425Z

hmm

2016-09-13T22:27:31.000426Z

zxcvbn.js is already minified - a special case here

juhoteperi 2016-09-13T22:27:40.000427Z

deps-cljs will use any *.inc.js file

juhoteperi 2016-09-13T22:28:14.000428Z

I think in this case it would be okay to copy the file (minified) to development folder under .inc.js extension

juhoteperi 2016-09-13T22:28:59.000429Z

Also, I fear Cljs doesn't support source-maps for foreign-libs, so that .map.js is probably unncessary

2016-09-13T22:29:14.000430Z

ok, will use .inc.js make it work then?

juhoteperi 2016-09-13T22:29:21.000431Z

(If no \.min.inc.js file exists, .inc.js is used always)

juhoteperi 2016-09-13T22:29:21.000432Z

yes

flyboarder 2016-09-13T22:29:34.000434Z

(sift :move {#"zxcvbn-4.3.0/dist/zxcvbn.js" "cljsjs/zxcvbn/production/zxcvbn.inc.js”)

juhoteperi 2016-09-13T22:29:50.000435Z

should work

flyboarder 2016-09-13T22:29:59.000436Z

but you will want to fix the regex to use the lib-version string instead of the hardcoded url

juhoteperi 2016-09-13T22:30:03.000437Z

and production folder is probably good call

2016-09-13T22:30:13.000438Z

yup, thanks guys, your support is awesome

2016-09-13T22:30:22.000439Z

probably some of the above should be documented for others?

juhoteperi 2016-09-13T22:30:46.000440Z

Yeah, improved documentation wouldn't hurt

juhoteperi 2016-09-13T22:30:53.000441Z

the wiki is open for everyone to edit

flyboarder 2016-09-13T22:31:18.000442Z

@juhoteperi a side note, it was noticed the other day that nothing points to the package readme's

juhoteperi 2016-09-13T22:31:53.000443Z

Would be quite easy to add links from the website

flyboarder 2016-09-13T22:32:13.000444Z

yeah the current links for the package name goes to clojars

flyboarder 2016-09-13T22:32:48.000445Z

and the home link the original project, kinda skips over the instructions for using the cljsjs version in a project

flyboarder 2016-09-13T22:33:16.000446Z

maybe we just need a document icon next to the home link

juhoteperi 2016-09-13T22:35:02.000447Z

hmh, the hard part is to choose the icon

juhoteperi 2016-09-13T22:35:02.000448Z

http://fontawesome.io/icon/question-circle/

juhoteperi 2016-09-13T22:35:12.000450Z

http://fontawesome.io/icon/book/

2016-09-13T22:36:55.000452Z

btw, is there a trick how to test extern files best?

2016-09-13T22:37:06.000453Z

possible to add a unit test or so in the same directory?

flyboarder 2016-09-13T22:37:08.000454Z

@juhoteperi I would say book, but they are both pretty 😛

juhoteperi 2016-09-13T22:38:02.000455Z

@michael.heuberger Nope 😞

juhoteperi 2016-09-13T22:38:45.000456Z

There is hope this will be fixed soon... by making extern files completely unncessary

2016-09-13T22:46:52.000457Z

okay, thanks again guys

2016-09-13T22:53:43.000458Z

uh, one more thing. zxcvbn.inc.js is already compiled with closure compiler. can you confirm that, in this case, no extern is needed and already has its own definitions?

juhoteperi 2016-09-13T22:54:57.000459Z

doesn't look like it is Closure library

2016-09-13T22:56:15.000460Z

what makes you say that?

juhoteperi 2016-09-13T22:56:58.000461Z

package.json in the project says it is compiled using browserify

juhoteperi 2016-09-13T22:57:12.000462Z

and it is written in coffeescript and uses commonjs modules

2016-09-13T23:25:01.000465Z

hello again. tell me, is this line (task-options! push {:ensure-branch nil}) really necessary? and what exactly does it?

juhoteperi 2016-09-13T23:31:06.000466Z

It disables check that certain branch is checked out

juhoteperi 2016-09-13T23:31:11.000467Z

It is probably anyway disabled

juhoteperi 2016-09-13T23:31:26.000468Z

It maybe used to be enabled by bootlaces library, but that is no longer used

juhoteperi 2016-09-13T23:31:47.000469Z

And CI is the only places where deploy is ran

juhoteperi 2016-09-13T23:31:53.000470Z

-> should be unncessary

2016-09-13T23:34:43.000471Z

thx, good to know