It may seem a bit tricky, comparing to good-old-way method, when you include libs from CDNs and add some custom JSs & CSSs to doc's head. But, I promise, you'll fall in love with webpack-way when you get used to it ^-)
Laravel Mix under the hood
If you've ever been confused and overwhelmed about getting started with Webpack and asset compilation, you will love Laravel Mix.
node & npm
Before triggering Mix, you must first ensure that Node.js and NPM are installed on your machine. Download and install version for your system.
The only remaining step is to install Laravel Mix & theme's package dependencies. You'll find a package.json file in the root of your directory structure. The default package.json file includes everything you need to get started. Think of this like your composer.json file, except it defines Node dependencies instead of PHP.
To install dependencies open system command line, cd to project's dir & run:
Theme's defaults are already built and located in the
public/_assets folder. Preconfigured build logic is located at
webpack.mix.js. Feel free to head up to Mix's docs for more information.
Theme's project sources are located at
There are 2 primary commands to build assets from sources:
npm run development builds non-minified sources for development environment (command runs much faster, than production).
npm run production builds production-ready minified sources.
You are free to uses theme's sources in your own build environment. If you would like to learn more about Mix, feel free to head up to Mix's docs.