Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoload Require.js config #88

Closed
tracend opened this issue Jun 23, 2013 · 1 comment
Closed

Autoload Require.js config #88

tracend opened this issue Jun 23, 2013 · 1 comment

Comments

@tracend
Copy link
Member

tracend commented Jun 23, 2013

The config generated for require.js on the server-side is expected to be loaded in main.js using:

require.config(KISSCMS['require']);

This, in combination with putting the initialization code in an init() method, although efficient may seem like a set of conventions someone can easily miss.

Ideally the require.js config file should be auto-loaded and the main.js free from all conventions.

tracend referenced this issue in GerHobbelt/kisscms Jun 23, 2013
….php requires it (you get a KISSCMS autogenerated 404 page instead): JS onload crashed on the missing init() function. This - admittedly very hacky fix - fixes that problem.

TODO: provide suitable '404' pages for missing JS files (and possibly others): anything that's not supposed to be HTML should get a real 404 instead of a substitute page.
tracend added a commit that referenced this issue Jun 27, 2013
tracend added a commit that referenced this issue Jun 27, 2013
@tracend
Copy link
Member Author

tracend commented Jun 27, 2013

The require config is not auto-loaded every time, both in DEBUG and production.

There's still the convention convention that a method named init that initiate the client. But if not available nothing fails now.

@tracend tracend closed this as completed Jun 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant