From 868f7e8a9ec8bf2164060e021c731b4a857e138e Mon Sep 17 00:00:00 2001 From: Terry Upton Date: Wed, 21 Oct 2020 17:21:03 +0100 Subject: [PATCH 1/6] adding purge css to tailwind config --- tailwind.config.js | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/tailwind.config.js b/tailwind.config.js index 1a63a33..81c2e05 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,6 +1,18 @@ const defaultTheme = require('tailwindcss/defaultTheme'); module.exports = { + purge: { + mode: 'all', + content: [ + './templates/**/*.html', + './templates/**/*.twig', + './src/**/*.js' + ], + + options: { + whitelistPatterns: [/lazyload/, /grayscale-up/, /blur-up/], + } + }, theme: { screens: { 'sm': '600px', @@ -9,7 +21,7 @@ module.exports = { 'xl': '1280px', 'xxl': '1400px', }, - + fontFamily: { sans: ['Open Sans', 'sans-serif'], }, @@ -24,7 +36,7 @@ module.exports = { 'youtube': '#BB0000', 'email': '#a0aec0' }, - + file: { 'doc': '#295595', 'xls': '#207245', @@ -32,16 +44,16 @@ module.exports = { 'pdf': '#FB3449', }, }, - + spacing: { '5/8': '62.5%', // '9/16': '56.25%' }, - + margin: { 'flood': 'calc(50% - 50vw)' }, - + minWidth: theme => ({ ...theme('spacing'), }), @@ -51,7 +63,7 @@ module.exports = { '8xl': '90rem', '9xl': '100rem', }, - + opacity: { '10': '0.10', '15': '0.15', @@ -65,14 +77,14 @@ module.exports = { '90': '0.90', '95': '0.95' }, - + zIndex: { '60': '60', '70': '70', '80': '80', '90': '90', }, - + gridTemplateColumns: { 'auto-fit-130': 'repeat(auto-fit, minmax(130px, 1fr))', 'auto-fit-150': 'repeat(auto-fit, minmax(150px, 1fr))', @@ -82,11 +94,11 @@ module.exports = { 'auto-fit-400': 'repeat(auto-fit, minmax(400px, 1fr))', 'auto-fit-600': 'repeat(auto-fit, minmax(600px, 1fr))', }, - + gridColumnEnd: { '-1': '-1', }, - + gridRowEnd: { '-1': '-1', }, From 62f420cd8647c9530dcc1fa571ac2d773b0cac7f Mon Sep 17 00:00:00 2001 From: Terry Upton Date: Wed, 21 Oct 2020 17:23:03 +0100 Subject: [PATCH 2/6] PurgeCSS config and dependencies removed from laravel-mix --- CHANGELOG.md | 7 +++++++ package.json | 1 - package.json.default | 1 - webpack.mix.js | 15 +-------------- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdca794..26b3204 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog All notable changes to this project will be documented in this file. +## [3.2.0] - 2020-10-20 +### Added +Adding PurgeCSS settings to tailwind config + +### Removed +PurgeCSS config and dependencies removed from laravel-mix + ## [3.1.0] - 2020-10-20 ### Changed Updated NPM Package and Dependencies diff --git a/package.json b/package.json index 5e30545..2c8ff08 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,6 @@ "imagemin-webpack-plugin": "^2.4.2", "laravel-mix": "^5.0.7", "laravel-mix-criticalcss": "^1.0.1", - "laravel-mix-purgecss": "^5.0.0", "laravel-mix-versionhash": "^1.1.7", "postcss-color-function": "^4.1.0", "postcss-pxtorem": "^5.1.1", diff --git a/package.json.default b/package.json.default index cb1d6de..c9c95ba 100644 --- a/package.json.default +++ b/package.json.default @@ -27,7 +27,6 @@ "imagemin-webpack-plugin": "^2.4.2", "laravel-mix": "^5.0.7", "laravel-mix-criticalcss": "^1.0.1", - "laravel-mix-purgecss": "^5.0.0", "laravel-mix-versionhash": "^1.1.7", "postcss-color-function": "^4.1.0", "postcss-pxtorem": "^5.1.1", diff --git a/webpack.mix.js b/webpack.mix.js index d227343..3611913 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -63,19 +63,6 @@ mix ] }) - .purgeCss({ - enabled: mix.inProduction(), - globs: [ - path.join(__dirname, settings.paths.templates.base + '**/*.{html,twig}'), - path.join(__dirname, settings.paths.build.js + '**/*.js'), - path.join(__dirname, settings.paths.src.js + '**/*.js'), - ], - defaultExtractor: content => content.match(/[\w-/.%:]+(? Date: Wed, 21 Oct 2020 17:24:09 +0100 Subject: [PATCH 3/6] Clean and tidy up of laravel-mix config --- CHANGELOG.md | 3 +++ webpack.mix.js | 37 ++++++++++--------------------------- 2 files changed, 13 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26b3204..0b91f21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. ### Added Adding PurgeCSS settings to tailwind config +### Changed +Clean and tidy up of laravel-mix config + ### Removed PurgeCSS config and dependencies removed from laravel-mix diff --git a/webpack.mix.js b/webpack.mix.js index 3611913..29f8c11 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -19,21 +19,6 @@ mix // Extract splits the JS into Vendor, Manfiest and Index .extract() - // .extract([ - // 'lazysizes', - // 'picturefill', - // 'jquery' - // ]) - - // Scripts Minifies Scripts - Use for Legacy Projects - // .scripts([settings.paths.src.js + 'classie.js'], settings.paths.build.js + 'classie.js') - - // .autoload({ - // jQuery: 'jquery', - // $: 'jquery', - // jquery: 'jquery', - // }) - .options({ processCssUrls: false, @@ -90,16 +75,14 @@ mix }); if (mix.inProduction()) { - mix - .versionHash() - - //CLEAN HASHED VERSIONS - .webpackConfig({ - plugins: [ - new CleanWebpackPlugin({ - cleanOnceBeforeBuildPatterns: settings.paths.build.clean, - dry: false, - }) - ] - }); + mix.versionHash(); + + mix.webpackConfig({ + plugins: [ + new CleanWebpackPlugin({ + cleanOnceBeforeBuildPatterns: settings.paths.build.clean, + dry: false, + }) + ] + }); } From 31aa2924333c571d713db92d4fc673df6a5e0faa Mon Sep 17 00:00:00 2001 From: Terry Upton Date: Wed, 21 Oct 2020 17:26:03 +0100 Subject: [PATCH 4/6] Removed postcs dependencies no longer required --- CHANGELOG.md | 4 ++++ package.json | 2 -- package.json.default | 2 -- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b91f21..163f00a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ Clean and tidy up of laravel-mix config ### Removed PurgeCSS config and dependencies removed from laravel-mix +Removed PostCSS dependencies no longer required + - PostCSS Colour Functions + - PostCSS Sorting + ## [3.1.0] - 2020-10-20 ### Changed Updated NPM Package and Dependencies diff --git a/package.json b/package.json index 2c8ff08..cecd384 100644 --- a/package.json +++ b/package.json @@ -35,10 +35,8 @@ "laravel-mix": "^5.0.7", "laravel-mix-criticalcss": "^1.0.1", "laravel-mix-versionhash": "^1.1.7", - "postcss-color-function": "^4.1.0", "postcss-pxtorem": "^5.1.1", "postcss-scss": "^3.0.2", - "postcss-sorting": "^6.0.0", "resolve-url-loader": "3.1.2", "sass": "^1.27.0", "sass-loader": "10.*", diff --git a/package.json.default b/package.json.default index c9c95ba..80310de 100644 --- a/package.json.default +++ b/package.json.default @@ -28,10 +28,8 @@ "laravel-mix": "^5.0.7", "laravel-mix-criticalcss": "^1.0.1", "laravel-mix-versionhash": "^1.1.7", - "postcss-color-function": "^4.1.0", "postcss-pxtorem": "^5.1.1", "postcss-scss": "^3.0.2", - "postcss-sorting": "^6.0.0", "resolve-url-loader": "3.1.2", "sass": "^1.27.0", "sass-loader": "10.*", From 74d078e62f75c4f567ffe5f439f9eef4fc69abda Mon Sep 17 00:00:00 2001 From: Terry Upton Date: Thu, 22 Oct 2020 09:22:28 +0100 Subject: [PATCH 5/6] Renamed Craft Site Name in Project Config --- CHANGELOG.md | 1 + config/project/project.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 163f00a..e6ccd25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Adding PurgeCSS settings to tailwind config ### Changed Clean and tidy up of laravel-mix config +Renamed Craft Site Name in Project Config ### Removed PurgeCSS config and dependencies removed from laravel-mix diff --git a/config/project/project.yaml b/config/project/project.yaml index 9bdd032..104668c 100644 --- a/config/project/project.yaml +++ b/config/project/project.yaml @@ -48,7 +48,7 @@ plugins: system: edition: pro live: true - name: 'Lincoln Green Solicitors' + name: 'Craft Boiler Plate' retryDuration: null schemaVersion: 3.5.13 timeZone: Europe/London From e8b92060279f280c2cc72a4a899aaa05ff59b484 Mon Sep 17 00:00:00 2001 From: Terry Upton Date: Thu, 22 Oct 2020 09:23:11 +0100 Subject: [PATCH 6/6] Version 3.2.0 --- composer.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index e4ff516..6aef9f3 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "terryupton/boilerplate-craft", "description": "A starting boilerplate for Craft Projects", - "version": "3.1.0", + "version": "3.2.0", "license": "MIT", "type": "project", "require": { diff --git a/package.json b/package.json index cecd384..175605d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "craft-bp", - "version": "3.1.0", + "version": "3.2.0", "description": "Craft CMS boilerplate and starter project", "main": "index.js", "keywords": [