Keen's JS codes are written in pure (vanila) Javascript (no jquery dependency) in order to make it easier to integrate with HTML
, Angular
, React
, VueJS
and Laravel
frameworks.
During the build process the JS codes are minified and moved to the assets folder (e.g: dist).
There are 2 types of the JS codes: Custom and Bundlable. The custom JS code is written in a JS file and minified and moved to the assets folder as a single
file for each page or element that requires a certain level of customization, while the bundlable JS files are written in separate JS files that are also minified and added bundled into 1 main JS file.
The Layout Folder in [keen]/theme/[demo]/src/js/layout/
contains javascript files that handle the Layout Partials(Aside, Header, Footer, Subheader, etc).
The Layout Javascript files are devided into Base
and Extended
groups where Base
Javascript files are mandatory and Extended
Javascript files are optional.
The Base Layout Javascript files in [keen]/theme/[demo]/src/js/layout/base
handle the following Layout Partials:
The Base Components Javascript are mandatory and they must be included in the main bundle javascript file [keen]/theme/[demo]/assets/js/scripts.bundle.js
in order Keen to perform properly.
The Extended Components Javascript are optional to use and if they enabled they will be included in the main bundle javascript file [keen]/theme/[demo]/assets/js/scripts.bundle.js
and initialized globally in all pages.
Vendors folder contains 3rd-party plugins global configuration and iinitializion code.
Pages folder contains custom Javascript files used to initialize all the theme demo features and examples.
This Javascript code should be used as a reference. In your product create your own javascript files according to your requirements.