From 6722b20d19b19c3c57e9dcac0774638fbaeeb4b6 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Mon, 22 Jun 2020 21:55:47 +1000 Subject: [PATCH] Add postcss and cssnano --- README.md | 7 +++++-- _config.yml | 2 ++ cssnano.config.js | 11 +++++++++++ package.json | 6 +++--- postcss.config.js | 5 +++++ yarn.lock | 28 +++++++++++++++++++--------- 6 files changed, 45 insertions(+), 14 deletions(-) create mode 100644 cssnano.config.js create mode 100644 postcss.config.js diff --git a/README.md b/README.md index c0b0f90f7..5bf819946 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ -# Devhints +

Devhints

> TL;DR for developer documentation - a ridiculous collection of cheatsheets -[![Status](https://travis-ci.org/rstacruz/cheatsheets.svg?branch=master)](https://travis-ci.org/rstacruz/cheatsheets "See test builds") +

+See test builds +Netlify deploy status +


diff --git a/_config.yml b/_config.yml index 499ea866f..63832dafb 100644 --- a/_config.yml +++ b/_config.yml @@ -13,6 +13,7 @@ exclude: - .cache - CNAME - CONTRIBUTING.md + - cssnano.config.js - docker_compose.yml - Dockerfile - Gemfile @@ -21,6 +22,7 @@ exclude: - node_modules - package.json - package-lock.json + - postcss.config.js - README.md - vendor - webpack.config.js diff --git a/cssnano.config.js b/cssnano.config.js new file mode 100644 index 000000000..3feefd020 --- /dev/null +++ b/cssnano.config.js @@ -0,0 +1,11 @@ +module.exports = { + preset: [ + 'default', + { + calc: false, + discardComments: { + removeAll: true + } + } + ] +} diff --git a/package.json b/package.json index 3b99eb08b..a58da5321 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "1.0.0", "author": "Rico Sta. Cruz ", "dependencies": { - "autoprefixer": "^9.8.0", + "autoprefixer": "^9.8.2", "dom101": "^2.2.1", "hint.css": "^2.6.0", "isotope-layout": "^3.0.6", @@ -46,8 +46,8 @@ "parcel:app:build": "parcel build '_parcel/app.js' -d assets/packed --no-source-maps --no-autoinstall", "parcel:app:watch": "parcel watch '_parcel/app.js' -d assets/packed --no-source-maps --no-autoinstall", "parcel:build": "run-s -s 'parcel:*:build'", - "parcel:critical:build": "parcel build '_parcel/critical*.{js,scss}' -d _includes/2017/critical --no-source-maps --no-autoinstall", - "parcel:critical:watch": "parcel watch '_parcel/critical*.{js,scss}' -d _includes/2017/critical --no-source-maps --no-autoinstall", + "parcel:critical:build": "parcel build '_parcel/critical*.js' -d _includes/2017/critical --no-source-maps --no-autoinstall", + "parcel:critical:watch": "parcel watch '_parcel/critical*.js' -d _includes/2017/critical --no-source-maps --no-autoinstall", "prejekyll:build": "bundle", "prejekyll:watch": "bundle", "prettier:format": "prettier --write '_parcel/**/*.{js,scss}'", diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 000000000..961986e2b --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,5 @@ +module.exports = { + plugins: { + autoprefixer: {} + } +} diff --git a/yarn.lock b/yarn.lock index fcb5f29da..0901fe14a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1538,17 +1538,17 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -autoprefixer@^9.8.0: - version "9.8.0" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.0.tgz#68e2d2bef7ba4c3a65436f662d0a56a741e56511" - integrity sha512-D96ZiIHXbDmU02dBaemyAg53ez+6F5yZmapmgKcjm35yEe1uVDYI8hGW3VYoGRaG290ZFf91YxHrR518vC0u/A== +autoprefixer@^9.8.2: + version "9.8.2" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.2.tgz#7347396ee576b18687041bfbacd76d78e27baa56" + integrity sha512-9UwMMU8Rg7Fj0c55mbOpXrr/2WrRqoOwOlLNTyyYt+nhiyQdIBWipp5XWzt+Lge8r3DK5y+EHMc1OBf8VpZA6Q== dependencies: browserslist "^4.12.0" - caniuse-lite "^1.0.30001061" - chalk "^2.4.2" + caniuse-lite "^1.0.30001084" + kleur "^4.0.1" normalize-range "^0.1.2" num2fraction "^1.2.2" - postcss "^7.0.30" + postcss "^7.0.32" postcss-value-parser "^4.1.0" aws-sign2@~0.7.0: @@ -2019,11 +2019,16 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001043, caniuse-lite@^1.0.30001061: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001043: version "1.0.30001083" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001083.tgz#52410c20c6f029f604f0d45eca0439a82e712442" integrity sha512-CnYJ27awX4h7yj5glfK7r1TOI13LBytpLzEgfj0s4mY75/F8pnQcYjL+oVpmS38FB59+vU0gscQ9D8tc+lIXvA== +caniuse-lite@^1.0.30001084: + version "1.0.30001085" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001085.tgz#bed28bd51ff7425d33ee23e730c7f3b703711db6" + integrity sha512-x0YRFRE0pmOD90z+9Xk7jwO58p4feVNXP+U8kWV+Uo/HADyrgESlepzIkUqPgaXkpyceZU6siM1gsK7sHgplqA== + capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -4834,6 +4839,11 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== +kleur@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.0.1.tgz#3d4948534b666e2578f93b6fafb62108e64f05ef" + integrity sha512-Qs6SqCLm63rd0kNVh+wO4XsWLU6kgfwwaPYsLiClWf0Tewkzsa6MvB21bespb8cz+ANS+2t3So1ge3gintzhlw== + leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -6213,7 +6223,7 @@ postcss@^6.0.1: source-map "^0.6.1" supports-color "^5.4.0" -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.11, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.27, postcss@^7.0.30: +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.11, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.27, postcss@^7.0.32: version "7.0.32" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.32.tgz#4310d6ee347053da3433db2be492883d62cec59d" integrity sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==