Reputation: 3972
I'm having a hard time getting my project to detect my less.js
folder.
I'm using laravel 5.1, and I'm not sure where to put my less.js
folder - since for Bootstrap and jQuery I just imported the src from a URL.
I currently have my less.js
folder I downloaded under:
resources > assets > less > less.js folder I downloaded
I currently have my styles.less
in my views while I try to figure this out.
My app.php
head:
<link rel="stylesheet/less" type="text/css" href="styles.less" />
<script src="less.js" type="text/javascript"></script>
I'd appreciate if anyone could quickly let me know where to drop the folder!
Thanks!
edit:
Screenshots:
https://i.sstatic.net/tGo1B.jpg
edit2:
https://i.sstatic.net/PkXeJ.jpg
The error in question:
Status 500 Type Script,
Upvotes: 1
Views: 240
Reputation: 14747
Only assets published at public/
folder are available. So, you need to drop files there:
public/assets/less/download_folder/less.js
Then load it with:
<script src="{!! url('assets/less/download_folder/less.js') !!}" type="text/javascript"></script>
Another way/solution is to publish assets from /resources
to public/
via Elixir:
elixir(function(mix) {
// location, origin
mix.copy('assets/less/download_folder/less.js', 'resources/assets/less/folder/less.js');
});
I will assume that less.js
is inside of public/assets/less/lessjs/dist/less.js
. Then, load it as:
<script src="{!! url('assets/less/lessjs/dist/less.js') !!}" type="text/javascript"></script>
Upvotes: 2
Reputation: 1278
use this script at your html head
<script src="{!! asset('less/less.js') !!}" type="text/javascript"></script>
Upvotes: 1