From 14fbf89f0e28efeffd247fe3c34f202d19bfa173 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 14 Jun 2019 20:08:14 +0100 Subject: [PATCH] Add and use postcss-import --- package.json | 1 + postcss.config.js | 1 + src/assets/css/custom-components.css | 2 ++ src/assets/css/tailwind.css | 10 ++++------ yarn.lock | 28 ++++++++++++++++++++++++++-- 5 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 src/assets/css/custom-components.css diff --git a/package.json b/package.json index cd26d89..154737a 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "babel-jest": "^23.6.0", "eslint": "^5.16.0", "eslint-plugin-vue": "^5.0.0", + "postcss-import": "^12.0.1", "tailwindcss": "^1.0.1", "vue-template-compiler": "^2.5.21" } diff --git a/postcss.config.js b/postcss.config.js index 5fa8eda..a41b7b3 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,5 +1,6 @@ module.exports = { plugins: { + 'postcss-import': {}, tailwindcss: "./tailwind.config.js", 'postcss-nested': {}, autoprefixer: {} diff --git a/src/assets/css/custom-components.css b/src/assets/css/custom-components.css new file mode 100644 index 0000000..fcd9676 --- /dev/null +++ b/src/assets/css/custom-components.css @@ -0,0 +1,2 @@ +@import 'components/links'; +@import 'components/search-form'; diff --git a/src/assets/css/tailwind.css b/src/assets/css/tailwind.css index c86bb10..81a75bc 100644 --- a/src/assets/css/tailwind.css +++ b/src/assets/css/tailwind.css @@ -1,8 +1,6 @@ -@tailwind base; +@import 'tailwindcss/base'; -@tailwind components; +@import 'tailwindcss/components'; +@import 'custom-components'; -@import './components/links.css'; -@import './components/search-form.css'; - -@tailwind utilities; +@import 'tailwindcss/utilities'; diff --git a/yarn.lock b/yarn.lock index 47c1cf2..944a64f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7211,7 +7211,7 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -pify@^2.0.0: +pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= @@ -7350,6 +7350,16 @@ postcss-functions@^3.0.0: postcss "^6.0.9" postcss-value-parser "^3.3.0" +postcss-import@^12.0.1: + version "12.0.1" + resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-12.0.1.tgz#cf8c7ab0b5ccab5649024536e565f841928b7153" + integrity sha512-3Gti33dmCjyKBgimqGxL3vcV8w9+bsHwO5UrBawp796+jdardbcFl4RP5w/76BwNL7aGzpKstIfF9I+kdE8pTw== + dependencies: + postcss "^7.0.1" + postcss-value-parser "^3.2.3" + read-cache "^1.0.0" + resolve "^1.1.7" + postcss-js@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-2.0.1.tgz#4154e906ff410930afab63a24210be1b831e89a9" @@ -7633,7 +7643,7 @@ postcss-unique-selectors@^4.0.1: postcss "^7.0.0" uniqs "^2.0.0" -postcss-value-parser@^3.0.0, postcss-value-parser@^3.3.0, postcss-value-parser@^3.3.1: +postcss-value-parser@^3.0.0, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0, postcss-value-parser@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== @@ -7902,6 +7912,13 @@ rc@^1.2.7: minimist "^1.2.0" strip-json-comments "~2.0.1" +read-cache@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774" + integrity sha1-5mTvMRYRZsl1HNvo28+GtftY93Q= + dependencies: + pify "^2.3.0" + read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" @@ -8226,6 +8243,13 @@ resolve@1.1.7: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= +resolve@^1.1.7: + version "1.11.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.0.tgz#4014870ba296176b86343d50b60f3b50609ce232" + integrity sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw== + dependencies: + path-parse "^1.0.6" + resolve@^1.10.0, resolve@^1.3.2, resolve@^1.5.0, resolve@^1.8.1: version "1.10.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.0.tgz#3bdaaeaf45cc07f375656dfd2e54ed0810b101ba"