Javascript
Customize Managed .js Files
To customize managed .js files in the Vendora project:
The .js files are located in the [vendora-project-directory-name/SRC-Assets/js/] folder, and a compressed version is created at [vendora-project-directory-name/HTML-Twig/dist/[theme-name]/assets/js/] folder after running the gulp command.
It's recommended to add your custom script to the custom.js file. This avoids conflicts in future updates, which might occur if you modify app-*.js or other js files.
Folder Structure
-
vendora-project-dir
//(source files)
-
SRC-Assets
//HTML-Twig project files
-
js
//compressed javascript files here
- app-product-date.js
- app-product-list-map.js
- app-product-map.js
- app.js
- custom.js
-
js
//compressed javascript files here
-
HTML-Twig
//HTML-Twig project files
-
dist
-
[theme-name]
//theme project files, eg : travel
-
assets
-
js
//compressed javascript files here
- app-product-date.js
- app-product-list-map.js
- app-product-map.js
- app.js
- custom.js
-
js
//compressed javascript files here
-
assets
-
[theme-name]
//theme project files, eg : travel
-
dist
-
SRC-Assets
//HTML-Twig project files
-
vendora-project-directory
-
assets
-
js
- app.min.js // compresed version javascript.
-
js
-
src
-
js
- app.js // javascript source files.
-
js
-
assets
For customization
-
Minified .js File: You can customize the minified .js file in
[vendora-project-directory-name/HTML-Twig/dist/[theme-name]/assets/js/]if you do not plan to usegulpautomation again. Ensure you've completed steps from the Getting Started page up to running thegulpcommand.
Avoid runninggulpafter customization, as it will overwrite changes. -
Javascript Source Files: The recommended method is to customize the JavaScript source files in
[vendora-project-directory-name/SRC-Assets/js].
After customization, rungulpto automatically build a compressed version in[vendora-project-directory-name/HTML-Twig/dist/[theme-name]/assets/js/].