SOW plugins
SOW = Step Of Web (smarty author)
https://www.stepofweb.comSmarty Core
Smarty is starting with this file!
src/js/sow_core/sow.js
One object - just one - holding everything.
Open your browser console and type: console.log($.SOW)

High quality is the reason!
SOW is a collection of plugins, writen from scratch for speed and scalability! All of them are interrelated and packed into main javascript file core.min.js
Use any plugin in seconds – literally!
Smarty uses logic controllers (src/js/vendors) for all Vendor plugins, to automagically load them only when are needed, according to html classes and attributes! You don't have to write any javascript code! Everything is handled by Smarty!
Example: this will load datepicker plugin, without you adding any javascript code:
<input type="text" class="form-control datepicker">
See the magic? .datepicker
is the only class you have to add, to load (via ajax) the plugin files and its functionality! That's it!
When datepicker is not needed, the plugin is not loaded! This is why Smarty is so fast: is not bloated with all unnecessary scripts!
Plugins Location
All SOW plugins are here: src/js/sow.core/
All Vendor plugins controllers are here: src/js/vendors/
Note: Vendor plugins are not packed into a single bundle - would be a huge javascript file!
Each vendor plugins is loaded via ajax by its own controller, only when needed (like the datepicker example above)!
So each vendor plugin has it's own small controller (~1Kb in size), packed into a final javascript file vendor_bundle.min.js
A controller is actually what you normally would write to make a javascript plugin work (Smarty is doing it for you).
Clarification
By using GULP, all plugins are packed into 2 final javascript files:
1. assets/js/core.min.js
- SOW plugins (also jQuery packed)
2. assets/js/vendor_bundle.min.js
- Vendor plugins controllers (also Bootstrap packed)
All other files you see inside assets/js/
folder, are actually the plugins which are dynamically loaded by controllers!
How to disable plugins
You can remove plugins from Smarty if you really want to (is not really needed)!
There are 2 main GULP files you can edit:
gulp.config__core.js
(SOW plugins)
gulp.config__vendors.js
(Vendors plugins)
Example: (from gulp.config__vendors.js)
datepicker: { enable: false
, autoinit: true, bundle: false },
This will disable the datepicker plugin, even the controller (src/js/vendors/datepicker.js
) is not packed by GULP anymore into vendor_bundle.min.js
!
SOW plugins Future
Smarty 5 is still using jQuery because many other plugins are using it!
SOW plugins will be rewriten to use pure VanillaJS - no jQuery or any other framework.
This will not affect you in any way, in fact, you might not even notice when you update your existing project!