I'm working on my own differently structured version of Laravel, I've got the PHP end of things working but I'm having a problem with Elixir.
I've seen that supposedly setting elixir.config.assetsDir to a different path should do it but it doesn't seem to work for me? Any thoughts
My assets are in the following file structure
And my gulp.js file (still in the project parent folder) looks like so:
var elixir = require('laravel-elixir');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Sass
| file for our application, as well as publishing vendor resources.
|
*/
elixir.config.assetsDir = "./support/resources/assets/";
elixir(function(mix) {
mix.sass('app.scss');
});
Running gulp simply produces
[gulp] Starting 'default'...
[gulp] Starting 'sass'...
Fetching Sass Source Files...
- resources/assets/sass/app.scss <-- Not Found
Saving To...
- public/css/app.css
[gulp] Finished 'default' after 460 ms
[gulp] Finished 'sass' after 468 ms
I can fix the issues by giving the full path of app.scss but ultimately I'd rather not as I plan to reuse this framework setup a lot.
从elixir 3.0版开始,我相信它现在称为assetsPath
:
elixir.config.assetsPath = './support/resources/assets';
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.