hardcode in jsloader.js #524

Closed
zj831007 opened this Issue Sep 4, 2012 · 3 comments

Projects

None yet

5 participants

zj831007 commented Sep 4, 2012

why to hardcode like this: que.push('main.js');
if do this, I dont change my dir of main.js.

Contributor
linshun commented Sep 10, 2012

It is only for application entry, and it can be adjusted if needed.

What is your requirement?

Do you have any suggestion?

This is totally a drive-by comment, but something like this might work well:

// around line 111
var $c = d.querySelector('#cocos2d-html5')
  , c = $c.c;

// around line 150
que.push( $c.getAttribute('data-main') || 'main.js');

I could make a pull request for this, but I honestly haven't used cocos2d yet!

I had the same issue. Now i'm bypassing this by ignoring the main.js mentioned in jsloader (the file just is not on the root of my site) and adding my own main.js in the appFiles.

The suggestion of kirbysayshi feels like a more correct solution.

@dingpinglv dingpinglv closed this May 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment