cljsjs

lwhorton 2017-08-03T11:40:52.146270Z

hey guys, is momentjs packages incorrectly? https://github.com/cljsjs/packages/blob/master/moment/build.boot

lwhorton 2017-08-03T11:41:34.159354Z

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

juhoteperi 2017-08-03T11:42:13.171955Z

Not all the packages follow that

juhoteperi 2017-08-03T11:42:30.177048Z

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

juhoteperi 2017-08-03T11:43:17.191560Z

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

lwhorton 2017-08-03T11:49:26.308377Z

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

lwhorton 2017-08-03T17:51:35.874513Z

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?

juhoteperi 2017-08-03T17:53:08.932350Z

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

juhoteperi 2017-08-03T17:53:17.938119Z

the file should already be named deps.cljs

lwhorton 2017-08-03T17:54:11.971030Z

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?

juhoteperi 2017-08-03T17:56:27.056590Z

Ummhh, not sure what your are doing

juhoteperi 2017-08-03T17:56:34.061452Z

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

juhoteperi 2017-08-03T17:57:00.077639Z

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

lwhorton 2017-08-03T17:58:01.115858Z

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?

juhoteperi 2017-08-03T17:58:27.133012Z

the file has to be on application fileset, not dependencies

juhoteperi 2017-08-03T17:58:34.136899Z

for boot-cljs to compile that