why to hardcode like this: que.push('main.js');
if do this, I dont change my dir of main.js.
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.