Fork me on GitHub
#cljsjs
<
2016-10-31
>
andrewzhurov15:10:03

Good scary day for all of you here! Came with some questions. Wanted to port a lib here: http://github.com/creationix/js-git But since I new to js, GCC and boot encounter some troubles along the way 🙂 Could someone help me with that and answer on a couple of silly questions ? So here they are: I see this lib inspired by mixin concept, so all the functional you must obtain by augment an object (by calling a func on it). Won't GCC mungle names of properties ? Example lib-code(in a func): > function (repo-object){ > ... > repo-object.number-of-commits = function () ... > ... } won't number-of-commits be mungled ? Seems found the way to extern this All the mixins funcs provided through default export, so we need to >require("a-good-one-js-mixin.js")(repo-object); to augment. If it's an anonymous func on default export can we export it somehow, maybe give it a name ? Aaand, since all the externed funcs in cljs put in one global ns, how could we distinguish not anonymous but with name collisions ? o.o Is there a way to supply a name for a func to extern based on ... name of file ? (like prefix it) Maybe there already exist ported packages with such architecture, so I could look on ? Thanks for time! May it be a good 31 of October for you 😉