Assets

All bundled assets are located in the folder starterkit/lib/assets and you can include the static js, css and media files.
By default, each controller will include all helper functions. These helpers are only accessible on the controller through helpers variable.

Javascript

This is an example to add a single custom javascript file from the assets folder. The path is point to the assets folder.
helpers.addJavascriptFile('js/custom/intro.js')

SASS

This is an example to add a single custom css file from the assets folder.
helpers.addCssFile('plugins/custom/cookiealert/cookiealert.bundle.css')

Vendors

Here is the example to add single vendor. Refer to config/settings.yml file in KT_THEME_VENDORS and you can find the vendor name.
helpers.addVendor('datatables')
This is an example to add multiple vendors.
helpers.addVendors(['formrepeater', 'fullcalendar'])

Build assets

Before running the application we need to build theme assets:
  1. Navigate your prompt to starterkit folder.
    cd starterkit
  2. Install node modules dependencies using NPM.
    npm install
  3. The below command will compile all the assets(sass, js, media) to public folder:
    npm run dev
Preview Get Help Buy Now