MolecularCartography / ili

Web-based software for visualization of molecular maps in 2D and 3D
Other
27 stars 21 forks source link

ENH: Add require.js to main.js #72

Closed ElDeveloper closed 8 years ago

ElDeveloper commented 8 years ago

This PR removes the <script src=... tags from index.html and adds the setup for requirejs.config, for main.js I've only exported the init function as I believe it is the only thing that needs to be exported, all other functions should be only local, but maybe my understanding is incorrect.

I also pushed the global variables out of main.js, I think this should work, but again, let's wait until we get to test the whole thing together.

As a side note, I noticed there are two files (three.js and dat.js) that were being loaded as non-minified modules, we should be loading them as minified versions, right? I've left a comment in the configuration dict regarding this, not sure why we had two files though.

antgonza commented 8 years ago

👍 looks good -- no idea about your questions.

iprotsyuk commented 8 years ago

@ElDeveloper Re non-minified files: sure thing, we don't need them in the production version, but sometimes it's helpful for debugging. So I'd propose to keep them in the repo for the time being though they're not included to the app

iprotsyuk commented 8 years ago

@ElDeveloper, exporting init function only seems ok. I suggest removing the comment about non-minified files, and this PR will be ready to be merged.

ElDeveloper commented 8 years ago

Fixed @iprotsyuk