Skip to content

Instantly share code, notes, and snippets.

@ladislavsulc
Last active September 26, 2019 14:42
Show Gist options
  • Save ladislavsulc/e5725ef23f1a3ecf1bb64a5be580c38c to your computer and use it in GitHub Desktop.
Save ladislavsulc/e5725ef23f1a3ecf1bb64a5be580c38c to your computer and use it in GitHub Desktop.
Laravel App Starter (Windows)

Steps

  1. Laragon (https://laragon.org/) - Quick App > Laravel (zip)
  2. Start Terminal in Laragon > composer install + npm install
  3. Copy .env.example to .env and verify your test domain under Laragon environment works.
  4. Install preset for Tailwindcss and PurgeCSS: https://github.com/laravel-frontend-presets/tailwindcss
  5. Add BrowserSync in Mix: https://laravel-mix.com/docs/5.0/browsersync

Example (webpack.mix.js)

const mix = require('laravel-mix');

require('laravel-mix-tailwind');
require('laravel-mix-purgecss');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */
mix.browserSync('laravel-test.test');

mix.js('resources/js/app.js', 'public/js')
   .postCss('resources/css/app.css', 'public/css')
   .tailwind('./tailwind.config.js');

if (mix.inProduction()) {
  mix
   .version()
   .purgeCss();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment