Closed sacdallago closed 8 years ago
Yeah that sounds good! Those are the exact links I've been following. I think I'm doing it right so far (: Thanks for the reminder @sacdallago !
Update: @sacdallago Turns out that the Biojs-slush does another bundling from that index.js ... but through browserify!! I've been messing around with the code but I found no easy way to expose our already webpack-bundled code to this format. We might have to refactor all the library dependencies.
SOOOO regretting going through the AMD module path!!!!! >:
I'm gonna start refactoring to the right format soon, unless you know of any other solution.
@sacdallago
I think I'm really, really stuck. Simply CANNOT import the dependencies and libraries. >:
I did this in index.js
var $ = require("./jquery-3.1.0.min");
var cornerstone = require("./cornerstone.min");
Just like many libraries we're using, cornerstone needs jquery in its implementation. When I ran an example snippet, I saw the error that $ can't be found for cornerstone.... I have no clue what to do now. Cuz pretty much every thing Bonestagram depends on wont work now. D=
@fayeli wait a sec, I got lost a bit. So Bonestagram won't work by using browserify? That's not an issue ;) just keep on going with the AMD pattern and webpack!
If, on the other hand, the error is dependent on imports and the import is simply jQuery (which, as you say, will be used also by other components), you can list it as a requirement, and not bundle it into the framework!
That's actually the preferred way! Just imagine you have 20 packages all depending on the same version of jquery, and all packages bundle the exact same version in their source.. You would have so much more code in the bundles that is redundant and resource demanding.
Try putting jquery as a requirement in the html (usual <script>
tag) and remove every require
to jquery in the rest of the app. If that works, jquery will be a requirement to run your tool, as simple as that ;)
Also, again: there's no wrong doing in sticking to a pattern (AMD + webpack), as long as you conform to their standards. BioJS has theirs, sure, but every pattern has pros and cons, I honestly believe webpack is better suited for your component (a frontend component!)
@sacdallago Ok let me try again tomorrow. It's not very straight forward on how to expose the webpack bundled code to the BioJS standards. Makes me quite worried about meeting the BioJS final requirement!! I'll keep you updated on how things go though. Thanks!
Dear @fayeli ,
Yesterday we received a mail from our org admin telling us to make sure 100% that you are aware of the guidelines for the final submission (which I'm pretty sure you are). But just to make sure: Google guidelines: https://developers.google.com/open-source/gsoc/help/work-product
BioJs requirements:
I will make sure that when the final project is released, it will be available at bonestagram.com (and I'll do so by copying your repo, checking out the gh-pages branch and exposing that on my private webserver - just so you know how I will proceed).
Best, Chris.
P.S.: Make sure to submit everything before Tuesday, August 23rd 19:00 UTC