framework: Elixir not able to version multiple files?
I’m not sure if the website is lacking documentation on this, whether it’s a genuine bug or if I’m just being derp. I’m also getting some other issues with it but I’ll create separate issues tickets for them.
I’m trying to version two scripts and a css file, but no matter how I call the version method it only ever hashes the last file passed to it, or possibly it hashes them all but removes any files preceding the last one and my computer is too fast to for me to spot it.
Here’s the contents of my package.json file:
{
"dependencies": {
"gulp": "^3.8.8",
"laravel-elixir": "*"
}
}
And here’s the content of my gulpfile.js:
elixir(function (mix) {
mix.less('bootstrap.less', 'public/assets/css/styles.min.css')
.scripts([
'dropdown.js',
'collapse.js',
'transition.js',
'affix.js',
'modal.js',
'switch.js',
'select2.js',
'link.js',
'custom.js'
], 'public/assets/js/global/main.js')
.scriptsIn('resources/js/ie-hacks', 'public/assets/js/ie/ie-hacks.min.js')
.version([
'public/assets/css/styles.min.css',
'public/assets/js/global/main.js',
'public/assets/js/ie/ie-hacks.min.js'
]);
});
And my terminal outputs this a result:
/usr/bin/node /home/ben/source/www_icb/node_modules/gulp/bin/gulp.js --color --gulpfile /home/ben/source/www_icb/gulpfile.js
[17:40:01] Using gulpfile ~/source/www_icb/gulpfile.js
[17:40:01] Starting ‘default’…
[17:40:01] Starting ‘less’…
[17:40:02] Finished ‘default’ after 387 ms
[17:40:03] gulp-notify: [Laravel Elixir]
[17:40:03] Finished ‘less’ after 1.85 s
[17:40:03] Starting ‘scripts’…
[17:40:03] Finished ‘scripts’ after 146 ms
[17:40:03] Starting ‘version’…
[17:40:03] Finished ‘version’ after 27 ms
Process finished with exit code 0
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 33 (15 by maintainers)
Pretty big useless bump (400+ days)
Hello Everyone,
I’m running Laravel 5.3 with laravel-elixir version ^6.0.0-14 and I had this issue today as well. All i did to fix it was add an array containing the multiple compiled files i want to version.
Hope that helps.
Yeah… After a lot of tests I can confirm that if I run “gulp version” everything works as expected.
But, if I run just “gulp” or “gulp watch” the issue still persist. Maybe not always, but is happening with large gulp files.
P.S.: Im using the last version of Elixir.