From 07ac041d69b3b1810e5db538b53fe62084490f7a Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Thu, 15 Apr 2021 19:22:57 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=9A=9A=20move=20to=20tailwind?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #136 --- package.json | 10 +++++----- postcss.config.cjs | 6 ++++++ src/main.js | 2 +- src/style.css | 3 +++ tailwind.config.js | 2 ++ vite.config.js | 12 ------------ 6 files changed, 17 insertions(+), 18 deletions(-) create mode 100644 postcss.config.cjs create mode 100644 src/style.css diff --git a/package.json b/package.json index 96dd5c10..d1dcf6fc 100644 --- a/package.json +++ b/package.json @@ -10,30 +10,30 @@ }, "license": "CC-BY-NC-SA-4.0", "devDependencies": { - "check-password-strength": "2.0.2", "@odit/lfk-client-js": "0.11.0", "@odit/license-exporter": "0.0.11", "@sveltejs/vite-plugin-svelte": "1.0.0-next.6", "@types/html-minifier": "4.0.0", "auto-changelog": "2.2.1", - "autoprefixer": "10.2.5", + "autoprefixer": "^10.2.5", + "check-password-strength": "2.0.2", "csvtojson": "2.0.10", "gridjs": "3.4.0", "html-minifier": "4.0.0", "localforage": "1.9.0", "marked": "2.0.3", + "postcss": "^8.2.10", "release-it": "14.6.1", "svelte": "3.37.0", "svelte-focus-trap": "1.2.0", "svelte-i18n": "3.3.9", - "svelte-preprocess": "4.7.0", + "svelte-preprocess": "^4.7.0", "svelte-select": "3.17.0", - "tailwindcss": "2.1.1", + "tailwindcss": "^2.1.1", "tinro": "0.6.1", "toastify-js": "1.10.0", "validator": "13.5.2", "vite": "2.1.5", - "vite-plugin-windicss": "0.14.0", "xlsx": "0.16.9" }, "release-it": { diff --git a/postcss.config.cjs b/postcss.config.cjs new file mode 100644 index 00000000..054c147c --- /dev/null +++ b/postcss.config.cjs @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +}; diff --git a/src/main.js b/src/main.js index cd90fb3f..51f1c65b 100644 --- a/src/main.js +++ b/src/main.js @@ -1,4 +1,4 @@ -import 'windi.css'; +import './style.css'; import "toastify-js/src/toastify.css"; import "gridjs/dist/theme/mermaid.css"; import App from './App.svelte'; diff --git a/src/style.css b/src/style.css new file mode 100644 index 00000000..bd6213e1 --- /dev/null +++ b/src/style.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js index 6ad85dad..c5cb6462 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,4 +1,6 @@ module.exports = { + // mode: 'jit', + purge: [ './src/**/*.svelte' ], theme: { extend: { colors: { diff --git a/vite.config.js b/vite.config.js index 569429e2..ac2cbe85 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,5 +1,4 @@ import svelte from '@sveltejs/vite-plugin-svelte'; -import windiCSS from 'vite-plugin-windicss'; import { minify } from 'html-minifier'; import { defineConfig } from 'vite'; // @@ -24,17 +23,6 @@ export default defineConfig(({ command, mode }) => { minify: isProduction }, plugins: [ - windiCSS({ - //@ts-ignore - verbose: true, - silent: false, - debug: true, - config: 'tailwind.config.js', // tailwind config file path (optional) - compile: false, // false: interpretation mode; true: compilation mode - prefix: 'windi-', // set compilation mode style prefix - globalPreflight: true, // set preflight style is global or scoped - globalUtility: true // set utility style is global or scoped - }), svelte({ //@ts-ignore hot: !isProduction, From 621395200751c2d42b9ad44c77e84bda03b62e83 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Thu, 15 Apr 2021 19:43:43 +0200 Subject: [PATCH 2/2] Added bs import fix ref #136 --- src/components/base/importfixes.svelte | 6 ++++++ tailwind.config.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/components/base/importfixes.svelte diff --git a/src/components/base/importfixes.svelte b/src/components/base/importfixes.svelte new file mode 100644 index 00000000..0e3d78f5 --- /dev/null +++ b/src/components/base/importfixes.svelte @@ -0,0 +1,6 @@ + +
\ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js index c5cb6462..9f521384 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,5 +1,5 @@ module.exports = { - // mode: 'jit', + mode: 'jit', purge: [ './src/**/*.svelte' ], theme: { extend: {