Hi guys,
I was wondering: how can I write some custom SCSS, put in the correct folder and get that file compiled (and so converted in CSS and push in the correct folder/in the correct file's code in public/assets) for it to be able to be consumed by my pages?
I've tried different methods but none felt the right intended way:
theme()->addCssFile('public/assets/css/custom.css');
directive eventhough I have to convert the file from SCSS to CSS manually via online tools and then put in public/assetsHi Lore Porre
You can put your custom JS file anywhere within the resources folder, then include the file reference path into /starterkit/resources/mix/scripts.js. It will be included in the assets build.
Thanks
Hi,
Please add resources/_keenthemes/src/demo1/sass/_custom.scss
custom SCSS file and write your custom code in it and include this file in the entry style resources/_keenthemes/src/demo1/sass/style.scss
as shown below:
//
// Theme style
//
// Initialize
@import "init";
// Components
@import "components/components";
// Layout
@import "layout/base/layout";
@import "layout/layout";
// Custom
@import "custom";
You're a wonderful human!
Just one question, since I'm using the Laravel starterkit my project doesn't have the middle demo1
folder, can I simply use the resources/_keenthemes/src/sass/_custom.scss
path?
Thanks so much!
Yes, please update the path to match with your folder structure.
Thank you
Can I ask one more thing?
How would you do the same thing but for custom JS code? I can't see any app.js file in resources/*
into which I can include custom js files..
Maybe resources\mix\plugins.js
?
Or maybe I need to include them in the config/settings.php
or gulp.config.js
files?