Fork me on GitHub
#cljsjs
<
2017-08-03
>
lwhorton11:08:34

i thought per https://github.com/cljsjs/packages/wiki/Creating-Packages packages were supposed to be cljsjs/<lib-name>/dev or prod or common/<lib-name>.ext or min.inc or inc.js

juhoteperi11:08:13

Not all the packages follow that

juhoteperi11:08:30

Some where packaged before the guide and haven't been updated

juhoteperi11:08:17

In this case it would make sense to fix this, because that includes files like cljsjs/common/locale/en.inc.js which might conflict with other packages

lwhorton11:08:26

i see.. thanks for confirming i’m not insane or dont know how to read code. took me a while to figure out because almost every other package i looked at did it properly

lwhorton17:08:35

would love it if someone could help me figure out what i’m doing wrong here trying to package a cljsjs so that its compatible with the new 1.9.854 global-exports Here is the fileset of the packaged files:

├── deps.cljs
└── cljsjs
    └── react-table
        ├── common
        │   └── react-table.ext.js
        ├── development
        │   └── react-table.inc.js
        └── production
            └── react-table.min.inc.js
and here is the deps.cljs file:
{:foreign-libs [{:file "cljsjs/react-table/development/react-table.inc.js"
                 :file-min "cljsjs/react-table/production/react-table.min.inc.js"
                 :provides ["react-table"]
                 :requires ["react"]
                 :global-exports {react-table ReactTable}}
                {:file "cljsjs/react-table/development/react-table.inc.js"
                 :file-min "cljsjs/react-table/production/react-table.min.inc.js"
                 :provides ["cljsjs.react-table"]
                 :requires ["cljsjs.react"]}]
 :externs ["cljsjs/react-table/common/react-table.ext.js"]}
In testing this out locally I get this really confusing message: "No such namespace: react-table-deps, could not locate react_table_deps.cljs, react_table_deps.cljc, or JavaScript source providing "react-table-deps" in file boot/cljs/main26474.cljs". Now what the heck is looking for the incorrect filename for the deps file? In part of my packaging task I do this:
(sift :move {#"^react-table\.ext\.js$" "cljsjs/react-table/common/react-table.ext.js"
                 #"^react-table\.inc\.js$" "cljsjs/react-table/development/react-table.inc.js"
                 #"^react-table\.min\.inc.js$" "cljsjs/react-table/production/react-table.min.inc.js"
                 #"^react-table-deps\.cljs$" "deps.cljs"})
Which is the only thing I can find that even references react-table-deps. What gives?

juhoteperi17:08:08

#"^react-table-deps\.cljs$" "deps.cljs" this part seems unncessary

juhoteperi17:08:17

the file should already be named deps.cljs

lwhorton17:08:11

well, i’m storing the file inside my-app/resources/react-table-deps.cljs for now until I make this an independent repo. but that shouldn’t matter, should it?

juhoteperi17:08:27

Ummhh, not sure what your are doing

juhoteperi17:08:34

are using boot-cljs without .cljs.edn file?

juhoteperi17:08:00

That would compile all the .cljs files, which would cause this problem if you have react-table-deps.cljs

lwhorton17:08:01

Hmm, that’s something. maybe because the react-table-deps.cljs is inside my resources, when i try to compile my app which depends on cljsljs.react-table it’s getting confused?

juhoteperi17:08:27

the file has to be on application fileset, not dependencies

juhoteperi17:08:34

for boot-cljs to compile that