diff --git a/client/.eslintrc.js b/client/.eslintrc.js index 1c6179f..8c34227 100644 --- a/client/.eslintrc.js +++ b/client/.eslintrc.js @@ -8,7 +8,8 @@ module.exports = { 'eslint:recommended' ], rules: { - 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', + //'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', + 'no-console': 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' }, parserOptions: { diff --git a/client/package-lock.json b/client/package-lock.json index 1cb93ef..665e166 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -8228,6 +8228,18 @@ } } }, + "postcss-import": { + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-12.0.1.tgz", + "integrity": "sha512-3Gti33dmCjyKBgimqGxL3vcV8w9+bsHwO5UrBawp796+jdardbcFl4RP5w/76BwNL7aGzpKstIfF9I+kdE8pTw==", + "dev": true, + "requires": { + "postcss": "^7.0.1", + "postcss-value-parser": "^3.2.3", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + } + }, "postcss-js": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-2.0.0.tgz", @@ -8995,6 +9007,23 @@ } } }, + "read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=", + "dev": true, + "requires": { + "pify": "^2.3.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, "read-file-stdin": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/read-file-stdin/-/read-file-stdin-0.2.1.tgz", @@ -10970,6 +10999,12 @@ "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.10.tgz", "integrity": "sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ==" }, + "vue-awesome": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/vue-awesome/-/vue-awesome-3.5.1.tgz", + "integrity": "sha512-oWPAoC1B/0aTxrw04MFxjVsXFsTz6f26KRxF5ItP59BM7uaAdJ8toHp7iFE5rpS/NOJJBheGPJIelfA5nzU4aA==", + "dev": true + }, "vue-axios": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/vue-axios/-/vue-axios-2.1.4.tgz", diff --git a/client/package.json b/client/package.json index 1dae7f6..526231b 100644 --- a/client/package.json +++ b/client/package.json @@ -21,8 +21,10 @@ "babel-eslint": "^10.0.1", "eslint": "^5.8.0", "eslint-plugin-vue": "^5.0.0", + "postcss-import": "^12.0.1", "purgecss": "^1.1.0", "tailwindcss": "^1.0.0-beta.3", + "vue-awesome": "^3.5.1", "vue-template-compiler": "^2.5.21" } } diff --git a/client/postcss.config.js b/client/postcss.config.js index 2bffdac..4b94996 100644 --- a/client/postcss.config.js +++ b/client/postcss.config.js @@ -1,20 +1,29 @@ const tailwindcss = require("tailwindcss"); const autoprefixer = require("autoprefixer"); const purgecss = require("@fullhuman/postcss-purgecss"); +const postcssImport = require('postcss-import') + +class TailwindExtractor { + static extract(content) { + return content.match(/[A-Za-z0-9-_:\/]+/g) || []; + } +} module.exports = { - plugins: [ - tailwindcss("./tailwind.config.js"), - autoprefixer({ - add: true, - grid: true - }), - //Only add purgecss in production - process.env.NODE_ENV === "production"? purgecss({ - content: [ - "./src/**/*.html", - "./src/**/*.vue" - ] - }): "" - ] -}; \ No newline at end of file + plugins: [ + postcssImport, + tailwindcss('./tailwind.config.js'), + purgecss({ + content: ['./src/**/*.vue'], + whitelist: ['html', 'body'], + extractors: [ + { + extractor: TailwindExtractor, + + extensions: ['html', 'js', 'vue'] + } + ] + }), + autoprefixer + ] +} diff --git a/client/src/App.vue b/client/src/App.vue index 4e755ea..fafabc6 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -1,5 +1,5 @@