User Tools

Site Tools


devel:hacking

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
devel:hacking [2012/09/18 08:38]
bredal [Headline]
devel:hacking [2012/11/14 13:22]
norangshol [Javascript] Updated info about require_config.dev.js.
Line 131: Line 131:
 When the module is done you write a controller for the page that plugs the needed plugins to the page elements. This should fail gracefully if the needed elements are not present. When the module is done you write a controller for the page that plugs the needed plugins to the page elements. This should fail gracefully if the needed elements are not present.
  
-NAVs javascript uses [[http://​requirejs.org/​|require.js]] - use this to create modules and specify dependencies.+NAVs javascript uses [[http://​requirejs.org/​|require.js]] - use this to create modules and specify dependencies. ​ 
 + 
 +Pro tip is to create ''​require_config.dev.js''​ in ''​media/​js/''​ and add the following configuration to requirejs:  
 +<​code>​require.urlArgs = "​bust="​ +  (new Date()).getTime();</​code>​ This makes sure your not using cached resources in your browser when developing, which browser loves to do! See [[http://​requirejs.org/​docs/​api.html#​config-urlArgs|config-urlArgs]] in requirejs documentation for «details»
 ====== Database ====== ====== Database ======
 NAV uses PostgreSQL as its database backend. ​ Namespaces (schemas) are NAV uses PostgreSQL as its database backend. ​ Namespaces (schemas) are
devel/hacking.txt · Last modified: 2014/11/05 10:57 by morten