So while on Twitch, streaming my current Laravel build I came up against something I have never thought about. How do I get Bootstrap.js from node modules into my Public JS folder without copy and pasting it in.
So to Gulp we go and for many this will be like I'm teaching you to suck eggs but for someone just starting out with Laravel and also Gulp it will help no end.
So the task here is to copy the JS script from one place to another in the same vain as when we gulp the sass files and compile. Laravel Elixir makes all these processes very easy with alot of things done for us out of the box.
So to the code! So by adding this through our Elixir function, Gulp grabs the file and places a nice little file into our destination.
So as you can see, we call mix.copy followed by open and closing brackets and shut the line off. Then add the file path to whatever it is you want to copy over and after the comma, the destination. Then run Gulp and Hazzah! your file is in it's destination and you can go ahead and call it using a URL::asset or whatever way you see fit.
Again very simple but also very handy when you know how!
We live in a world where technology rules, a world where we cant seem to cross the road with out...
It would seem its a common thing this day in age. As a developer I have a certain amount of compu...