Javascript Compilation

You don’t need to worry about Javascript compilation because it is automatically compiled in the background. When saving your work, a Javascript script string is compiled and will be activated on your front website.

Don’t forget that the order in which the files are imported is important! For example, if you have a file called « variables » and you use these variables in another file called « theme », then your variables file must be called before your theme file :

The index file :

import "variables";
import "theme";

The functions file :

var hello = function() {
    return "Hello";
}

The theme file :

$('button').click(function() {
    alert(hello());
})

You don’t need to call the jQuery ready function, the compilation automatically waits for it.