Closed varmad closed 10 years ago
Is there a reason those files can be in /app/assets?
Just publish the config file for assets pipeline and add the route there
Jesús Solis
El 22/11/2013, a las 04:42 a.m., Srinivasa varma notifications@github.com escribió:
Hi
I have some files in public folder. How I can include?
— Reply to this email directly or view it on GitHub.
@evantishuk there is no specific reason, suppose if I want to use then it should be accessed from any folder
I configured as follows
My actual css file is in public/assets/vendors/demo/demo.css
In app/config/packages/codesleeve/asset-pipeline/config.php added below line
'paths' => { ..........
'public/assets/vendors' => 'javascripts,stylesheets', ..... }
and then in app/assets/application.css added below line of code
*= require demo/demo
after doing this the demo.css file was included but the styles are not applying
can any one please suggest on this
Thanks
@varmad there is nothing wrong with including your public folder in your paths but I would be weary of doing public/assets/ ...
because that is your prefix.
So if you go to http://localhost:8000/assets/vendors/foo.js (will this hit the asset pipeline or just the regular file?) That all depends on how you have your mod_rewrite filters and for apache or nginx differ ... ultimately this could cause you (and your sysadmin) a lot of headaches.
What happens if you use public/someotherfolder
instead?
Publish config
php artisan config:publish codesleeve/asset-pipeline
inside of app/config/packages/codesleeve/asset-pipeline/config.php
add to paths
'paths' => array(
'app/assets/javascripts',
'app/assets/stylesheets',
'lib/assets/javascripts',
'lib/assets/stylesheets',
'provider/assets/javascripts',
'provider/assets/stylesheets',
'public/assets/vendors'
),
Hi
I have some files in public folder. How I can include?
and how I can include a specific file from public/assets/js folder?