Skip to content

Commit

Permalink
Merge branch 'release/3.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
terryupton committed Oct 22, 2020
2 parents 48291e1 + e8b9206 commit c08fabc
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 60 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# 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

### 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

Removed PostCSS dependencies no longer required
- PostCSS Colour Functions
- PostCSS Sorting

## [3.1.0] - 2020-10-20
### Changed
Updated NPM Package and Dependencies
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion config/project/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down Expand Up @@ -34,12 +34,9 @@
"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",
"postcss-scss": "^3.0.2",
"postcss-sorting": "^6.0.0",
"resolve-url-loader": "3.1.2",
"sass": "^1.27.0",
"sass-loader": "10.*",
Expand Down
3 changes: 0 additions & 3 deletions package.json.default
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,9 @@
"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",
"postcss-scss": "^3.0.2",
"postcss-sorting": "^6.0.0",
"resolve-url-loader": "3.1.2",
"sass": "^1.27.0",
"sass-loader": "10.*",
Expand Down
32 changes: 22 additions & 10 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -9,7 +21,7 @@ module.exports = {
'xl': '1280px',
'xxl': '1400px',
},

fontFamily: {
sans: ['Open Sans', 'sans-serif'],
},
Expand All @@ -24,24 +36,24 @@ module.exports = {
'youtube': '#BB0000',
'email': '#a0aec0'
},

file: {
'doc': '#295595',
'xls': '#207245',
'ppt': '#ca4935',
'pdf': '#FB3449',
},
},

spacing: {
'5/8': '62.5%',
// '9/16': '56.25%'
},

margin: {
'flood': 'calc(50% - 50vw)'
},

minWidth: theme => ({
...theme('spacing'),
}),
Expand All @@ -51,7 +63,7 @@ module.exports = {
'8xl': '90rem',
'9xl': '100rem',
},

opacity: {
'10': '0.10',
'15': '0.15',
Expand All @@ -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))',
Expand All @@ -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',
},
Expand Down
52 changes: 11 additions & 41 deletions webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -63,19 +48,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-/.%:]+(?<!:)/g) || [],
extensions: ["html", "js", "php", "vue", "twig"],
whitelistPatterns: [/lazyload/, /grayscale-up/],
// whitelistPatternsChildren: [/body/, /ls-blur-up-img/],
})

//IMAGE and SVG MIN
.webpackConfig({
plugins: [
Expand Down Expand Up @@ -103,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,
})
]
});
}

0 comments on commit c08fabc

Please sign in to comment.