Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 3.22 KB

bk-javascript-dev-guide.md

File metadata and controls

52 lines (38 loc) · 3.22 KB
group title landing-page
javascript-developer-guide
JavaScript Developer Guide
JavaScript Developer Guide

Introduction {#overview-introduction}

By default, the Magento application uses the RequireJS file and module loader to optimize the time of loading pages with included JavaScript files, and to manage dependencies of JavaScript resources.

You can follow the same approach when customizing Magento JavaScript, or disable all the default scripts and their load by RequireJS.

For information about how JS resources are located and configured, see the JavaScript resources topic in the Configuration Guide.

What's in this guide {#js_contents}

Topics of this book describe the following:

JavaScript automatic testing is described in a separate JavaScript unit testing topic.

Terms used {#js_terms}

Term Description
JavaScript component (JS component) Any separate .js file decorated as AMD module.
Ui component JS component located in the Magento_Ui module, in the [app/code/Magento/Ui/view] directory.
jQuery UI widget A JS component/widget provided by the [jQuery UI library used in Magento].
jQuery widget Custom widget created using jQuery UI Widget Factory and decorated as AMD module. Many Magento JS components are the jQuery widgets.

[Magento_Ui]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Ui [app/code/Magento/Ui/view]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Ui/view [jQuery UI library used in Magento]: {{ site.mage2bloburl }}/{{ page.guide_version }}/lib/web/jquery/jquery-ui-1.9.2.js [jQuery Widget]: https://jqueryui.com/widget/