0
Using the Laravel Elixir, I usually use the functions styles
and scripts
to concatenate the Assets to a single file. However, it seems that by default these two functions try to read files from the folder resources/assets
.
Whenever I need to perform these operations in the folder node_modules
, i need to put "two-points" in the file path, which makes the task get quite boring.
My file gulpfile.js
is like this:
elixir(function (mix) {
mix.styles([
'../../../node_modules/admin-lte/dist/css/AdminLTE.css',
'../../../node_modules/admin-lte/dist/css/skins/_all-skins.css',
'../../../node_modules/ionicons/dist/css/ionicons.css'
], 'public/css/_compiled.css');
});
Is there any way to set the default read folder of these file, for me to avoid repetition of ../../../node_modules/
?
elixir.config.assetsDir = 'node_modules/js/';
– Diego Souza
Cool, I think that solves it too. It would be interesting if it had how to make a default folder definition by calling
styles
orscripts
.– Wallace Maxters