Hi. What's best way to include external JS lib, in case that I want manipulate it's functions in Clojure (CLJS) code?
can't find .inc.js in hoplon-demos
michaniskin
crazydiamond: how do you mean?
.inc.js doesn't work for you?
crazydiamond
'cause there aren't ones in hoplon-demos, I wonder if there is more popular way
or.. ppl just don't doing that
michaniskin
well with the coming updates with boot2 branch there will be some new things
crazydiamond
*aren't
ok
michaniskin
there is documentation though on the hoplon master branch about it
i mean about the current mechanism
which does everything oyu need, probably
crazydiamond
oh btw, I must watch video about Angualr JS
that's the case
thanks
michaniskin
the new way will have some improvements, but nothing major over the old way really
crazydiamond
I have installed lib with bower
and now have bower_components in resources
michaniskin
if you want to do that then there is nothing in hoplon to handle it
you can just do (script :src ...) in your hoplon app
crazydiamond
so, now I probably should symlink the main file
so that it would have inc.js ext
michaniskin
that would probably work, yeah
hayohayo1 has quit
crazydiamond
so, if I have file src/foo.inc.js with content "var my_foo = 'bar';" I should be able to get value "bar" in src/hl/myproject/index.cljs.hl as "js/my_foo" ?
e.g. (html (body (js/alert js/my_foo )))
onetom__ has quit
but I got in browser:
Uncaught ReferenceError: my_foo is not defined
michaniskin
crazydiamond: if you look at the compiled js what do you see?
you're using boot1 correct?
crazydiamond
uhm... I'm just running "boot development"
and, in JS, among anything else I see "alert(my_foo),"
and that's only occurrence of my_foo
*the only
:src-paths #{"src/hl" "src/cljs" "src/clj"})
aha
worked!
(moved from src to src/cljs)
michaniskin
crazydiamond: that makes sense :)
raywillig
michaniskin: noticing an odd behavior with boot-hoplon. i'm using boot-sass and make a change to .scss file. hoplon fires for some reason after that but never makes index.html so i get a weird index listing of files in resources/public. it basically does it every time. if i `touch src/index.html.hl` it builds it so i have a workaround if in fact it's a bug
michaniskin
raywillig: thanks
new snapshot pushed
raywillig
i found a bug? yay!
michaniskin
please delete your copy in local .m2 and try again
sorry, new snapshot of boot-hoplon
raywillig
awesome, you da man
michaniskin
sweet!
pandeiro has quit
raywillig
michaniskin: btw do i need to do anything special other than include (reload) in the pipeline to use boot-reload?
and where should it go?
michaniskin
you don't need to do anything else
it should go before cljs because it's emitting cljs that needs to be compiled
you'll see that in the output it prints
raywillig
so after hoplon, but before cljs?
michaniskin
basically the tasks will tell you what they're doing
var G__41058=console.log(G__41059);return G__41058}()
(I've changed name to "mycontainer" to be more unique)
hayohayo joined the channel
hayohayo1 has quit
I just needed (js/$ (fn []
(do
...)))
i.e. document.ready
LOL :D
tcrawley-away is now known as tcrawley
tcrawley is now known as tcrawley-away
jumblerg joined the channel
jumblerg has quit
jumblerg joined the channel
jumblerg has quit
hayohayo has quit
rbolkey has quit
rbolkey joined the channel
luxbock has quit
luxbock joined the channel
NOTICE: [boot] jeluard opened issue #144: Improve sift :move when dealing with multiple files http://git.io/xT3w
rbolkey has quit
rbolkey joined the channel
DomKM has quit
rbolkey has quit
rbolkey joined the channel
jjttjj has quit
rbolkey has quit
rbolkey joined the channel
ul joined the channel
catonano has quit
catonano joined the channel
DomKM joined the channel
rbolkey joined the channel
tbl has quit
tbl joined the channel
dwn_ has quit
mr-foobar has quit
onetom__ joined the channel
rbolkey has quit
rbolkey joined the channel
hayohayo joined the channel
onetom__ has quit
dm3 joined the channel
TheAncientGoat has quit
TheAncientGoat joined the channel
TheAncientGoat has quit
TheAncientGoat joined the channel
piranha joined the channel
ul
michaniskin: haha, you opened my eyes yesterday. i was really ignoring all benefits of native scope & namespacing things trying to build my own abstraction with identical purpose everytime
“#hoplon channel — how i stopped worrying and started to use straightforward solutions for fun and profit”
but, i should say, those shiny things completely broke my timeline
instead of making project i constantly sharp my tools