Hello, I'm working with the fantastic Metronic 8 Rails starter app (v8.1.7), but I noticed Toastr isn't in settings.yml as a vendor.
I'm trying to implement it to use for Rails flash messages, but so far haven't been able to figure out how to get it implemented. Any advice? I used yarn/gulp for the build.
Thanks!
Hi Ian Adams,
Glad you have solved it. We will add the instruction in the docs.
Thanks
Nevermind. I found the answer in the Custom Bundles section of the docs. Just had to remove the "toastr" section from the "optional" section of the gulp.config.js file, then put this in the "custom" section of the same file:
toastr: {
src: {
styles: ["{$config.path.common_src}/plugins/toastr/build/toastr.css"],
scripts: ["{$config.path.common_src}/plugins/toastr/build/toastr.min.js"],
},
dist: {
scripts: "{$config.dist}/plugins/custom/toastr/toastr.bundle.js",
styles: "{$config.dist}/plugins/custom/toastr/toastr.bundle.css",
}
},
"toastr": {
"js": [
"custom/toastr/toastr.bundle.js"
],
"css": [
"custom/toastr/toastr.bundle.css"
]
}