I’m trying to add some style and script files to the asset pipeline, I want them to concatenate into the main.css and main.js files, but I’m not sure on the best practice.
I tried adding them to the manifest.json as a few others suggested but that hasn’t worked for me thus far:
"dependencies": {
"main.js": {
"files": [
"scripts/main.js"
],
"vendor": [
"assets/scripts/plugins/owl.carousel.min.js"
],
"main": true
},
"main.css": {
"files": [
"styles/main.scss"
],
"vendor": [
"assets/styles/plugins/owl.carousel.css",
"assets/styles/plugins/owl.theme.css",
"assets/styles/plugins/owl.transitions.css"
],
"main": true
},
I was also wondering about the best way to include scripts such as this one? -->
<script>
function buttonClick() { swal({ title: '', html: '', showConfirmButton: true, closeOnConfirm: false }); }
</script>
As I’m assuming there is a much better way then sticking it in the footer template file for instance.