feat(assets): Change default CSS framework to Tailwind
* enhance(view): Add light default styling for Tailwind * chore(view): Clean up unnecessary selectors and spacing * feat(acorn): Update Acorn for Laravel 8.x * chore(acorn): Create default `bootstrap/` project directory for Laravel 8.x * refactor(acorn): Split the Acorn bootloader between `functions.php` and `bootstrap/app.php` to coincide with Laravel * refactor(assets): Lighten the out of the box CSS boilerplate * refactor(assets): Rename `dist/` to `public/` to coincide with Laravel * refactor(assets): Flatten the `assets/` directory into `resources/` to coincide with Laravel * refactor(assets): Rename `scripts/` to `js/` to coincide with Laravel * refactor(assets): Rename `styles/` to `css/` to coincide with Laravel * feat(deps): Update to Laravel Mix ^6.0 * chore(deps): Change Mix-related package.json `scripts` to the new `mix` binary * chore(deps): Remove PurgeCSS in favor of Tailwind's built in purge * chore(deps): Remove deprecated/unnecessary/unused dependencies * chore(deps): Bump minimum PHP version to 7.3 to coincide with Laravel 8.x
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
const mix = require('laravel-mix');
|
||||
require('@tinypixelco/laravel-mix-wp-blocks');
|
||||
require('laravel-mix-purgecss');
|
||||
require('laravel-mix-copy-watched');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -15,30 +13,28 @@ require('laravel-mix-copy-watched');
|
||||
*/
|
||||
|
||||
mix
|
||||
.setPublicPath('./dist')
|
||||
.setPublicPath('./public')
|
||||
.browserSync('sage.test');
|
||||
|
||||
mix
|
||||
.sass('resources/assets/styles/app.scss', 'styles')
|
||||
.sass('resources/assets/styles/editor.scss', 'styles')
|
||||
.purgeCss({
|
||||
extend: { content: [path.join(__dirname, 'index.php')] },
|
||||
whitelist: require('purgecss-with-wordpress').whitelist,
|
||||
whitelistPatterns: require('purgecss-with-wordpress').whitelistPatterns,
|
||||
.sass('resources/css/app.scss', 'css')
|
||||
.sass('resources/css/editor.scss', 'css')
|
||||
.options({
|
||||
processCssUrls: false,
|
||||
postCss: [require('tailwindcss')('./tailwind.config.js')],
|
||||
});
|
||||
|
||||
mix
|
||||
.js('resources/assets/scripts/app.js', 'scripts')
|
||||
.js('resources/assets/scripts/customizer.js', 'scripts')
|
||||
.blocks('resources/assets/scripts/editor.js', 'scripts')
|
||||
.extract();
|
||||
.js('resources/js/app.js', 'js')
|
||||
.js('resources/js/customizer.js', 'js')
|
||||
.blocks('resources/js/editor.js', 'js');
|
||||
|
||||
mix
|
||||
.copyWatched('resources/assets/images/**', 'dist/images')
|
||||
.copyWatched('resources/assets/fonts/**', 'dist/fonts');
|
||||
.copyDirectory('resources/images/**', 'public/images')
|
||||
.copyDirectory('resources/fonts/**', 'public/fonts');
|
||||
|
||||
mix
|
||||
.autoload({ jquery: ['$', 'window.jQuery'] })
|
||||
.options({ processCssUrls: false })
|
||||
.sourceMaps(false, 'source-map')
|
||||
.extract()
|
||||
.sourceMaps()
|
||||
.version();
|
||||
|
||||
Reference in New Issue
Block a user