From 55b4694322937804fb5d9505149a520b4fc84dac Mon Sep 17 00:00:00 2001 From: Colin Densem Date: Thu, 23 Jul 2020 21:21:36 +0100 Subject: [PATCH 1/3] feat: upgrade packages TW 1.5.2 & related configs --- package.json | 11 +++++------ postcss.config.js | 13 ++++--------- tailwind.config.js | 3 ++- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index d4d18a8b..c68f7759 100644 --- a/package.json +++ b/package.json @@ -5,16 +5,15 @@ "production": "cross-env NODE_ENV=production postcss public/tailwind.css -o public/build/tailwind.css", "start": "npm run serve" }, - "dependencies": { - "autoprefixer": "^9.5.1", - "tailwindcss": "^1.0" - }, + "dependencies": {}, "devDependencies": { "@fullhuman/postcss-purgecss": "^1.2.0", - "concurrently": "^4.1.0", + "autoprefixer": "^9.8.5", + "concurrently": "^5.2.0", "cross-env": "^5.2.0", "cssnano": "^4.1.10", "live-server": "^1.2.1", - "postcss-cli": "^6.1.2" + "postcss-cli": "^7.1.1", + "tailwindcss": "^1.5.2" } } diff --git a/postcss.config.js b/postcss.config.js index e4fec190..05ddeabd 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,14 +1,9 @@ -const purgecss = require('@fullhuman/postcss-purgecss')({ - content: ['./public/**/*.html'], - defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || [] -}) - module.exports = { plugins: [ require('tailwindcss'), require('autoprefixer'), - ...process.env.NODE_ENV === 'production' + ...(process.env.NODE_ENV === 'production' ? [purgecss, require('cssnano')] - : [] - ] -} + : []), + ], +}; diff --git a/tailwind.config.js b/tailwind.config.js index af829e20..8412fc2a 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,7 +1,8 @@ module.exports = { + purge: ["./public/**/*.html"], theme: { extend: {}, }, variants: {}, plugins: [], -} +}; From b177ba9b4a5302ec539d0bb2fbd7f9890390b563 Mon Sep 17 00:00:00 2001 From: Colin Densem Date: Thu, 23 Jul 2020 21:23:10 +0100 Subject: [PATCH 2/3] feat: add editor config Many editors try to help with formatting. When local settings differ, it becomes a chore. --- .editorconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..46d01586 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,11 @@ +# https://editorconfig.org + +root = true +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +quote_type= single From 0c3427a2d3db79be9ccbc5f9342f98fdf04854cb Mon Sep 17 00:00:00 2001 From: Colin Densem Date: Thu, 23 Jul 2020 21:34:06 +0100 Subject: [PATCH 3/3] fix: editorconfig spacing --- .editorconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 46d01586..1f77c906 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,4 +8,4 @@ indent_size = 2 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true -quote_type= single +quote_type = single