@@ -37,13 +37,13 @@ class JavascriptRenderer
37
37
protected $ basePath ;
38
38
39
39
protected $ cssVendors = array (
40
- 'vendor/font-awesome/css/font-awesome.min.css ' ,
41
- 'vendor/highlightjs/styles/github.css '
40
+ 'fontawesome ' => ' vendor/font-awesome/css/font-awesome.min.css ' ,
41
+ 'highlightjs ' => ' vendor/highlightjs/styles/github.css '
42
42
);
43
43
44
44
protected $ jsVendors = array (
45
- 'vendor/jquery/dist/jquery.min.js ' ,
46
- 'vendor/highlightjs/highlight.pack.js '
45
+ 'jquery ' => ' vendor/jquery/dist/jquery.min.js ' ,
46
+ 'highlightjs ' => ' vendor/highlightjs/highlight.pack.js '
47
47
);
48
48
49
49
protected $ includeVendors = true ;
@@ -247,6 +247,23 @@ public function areVendorsIncluded()
247
247
return $ this ->includeVendors !== false ;
248
248
}
249
249
250
+ /**
251
+ * Disable a specific vendor's assets.
252
+ *
253
+ * @param string $name "jquery", "fontawesome", "highlightjs"
254
+ *
255
+ * @return void
256
+ */
257
+ public function disableVendor ($ name )
258
+ {
259
+ if (array_key_exists ($ name , $ this ->cssVendors )) {
260
+ unset($ this ->cssVendors [$ name ]);
261
+ }
262
+ if (array_key_exists ($ name , $ this ->jsVendors )) {
263
+ unset($ this ->jsVendors [$ name ]);
264
+ }
265
+ }
266
+
250
267
/**
251
268
* Sets the javascript class name
252
269
*
0 commit comments