File tree Expand file tree Collapse file tree 5 files changed +19
-5
lines changed Expand file tree Collapse file tree 5 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ function bigbox_facetwp_wp_enqueue_scripts() {
24
24
25
25
$ deps = [
26
26
$ stylesheet ,
27
+ ( $ stylesheet . '-simplebar ' ),
27
28
'jquery ' ,
28
29
];
29
30
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ function bigbox_woocommerce_wp_enqueue_scripts() {
40
40
41
41
$ deps = [
42
42
$ stylesheet ,
43
+ ( $ stylesheet . '-simplebar ' ),
43
44
'wp-util ' ,
44
45
'woocommerce ' ,
45
46
];
Original file line number Diff line number Diff line change @@ -73,11 +73,21 @@ function bigbox_enqueue_scripts() {
73
73
$ version = bigbox_get_theme_version ();
74
74
$ stylesheet = bigbox_get_theme_name ();
75
75
76
+ // SimpleBar.
77
+ wp_enqueue_script (
78
+ $ stylesheet . '-simplebar ' ,
79
+ get_template_directory_uri () . '/public/js/simplebar.min.js ' ,
80
+ array (),
81
+ '4.1.0 ' ,
82
+ true
83
+ );
84
+
76
85
$ deps = [
77
86
'hoverIntent ' ,
87
+ ( $ stylesheet . '-simplebar ' ),
78
88
];
79
89
80
- // Combined application scripts .
90
+ // Application script .
81
91
wp_enqueue_script (
82
92
$ stylesheet ,
83
93
get_template_directory_uri () . '/public/js/app.min.js ' ,
Original file line number Diff line number Diff line change 1
- /**
2
- * Extenal dependencies.
3
- */
4
- import SimpleBar from 'simplebar' ;
1
+ /* global SimpleBar */
5
2
6
3
/**
7
4
* Scroll a horizontal menu to the active item.
Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ const config = {
114
114
jquery : 'jQuery' ,
115
115
$ : 'jQuery' ,
116
116
'@wordpress/element' : 'wp.element' ,
117
+ simplebar : 'window.SimpleBar' ,
117
118
} ,
118
119
plugins : [
119
120
new SpritePlugin ( ) ,
@@ -122,6 +123,10 @@ const config = {
122
123
from : 'resources/assets/images/icons' ,
123
124
to : 'public/images/icons' ,
124
125
} ,
126
+ {
127
+ from : './node_modules/simplebar/dist/simplebar.min.js' ,
128
+ to : 'public/js/simplebar.min.js' ,
129
+ } ,
125
130
] ) ,
126
131
new MiniCssExtractPlugin ( {
127
132
filename : './public/css/[name].min.css' ,
You can’t perform that action at this time.
0 commit comments