From 95e96595f64f95ce8c195cfcdcaf24be457a4c56 Mon Sep 17 00:00:00 2001 From: Dima Vyshniakov Date: Mon, 1 Jul 2024 12:19:42 +0200 Subject: [PATCH] Enable Tailwind CSS --- .github/workflows/pull-request-jobs.yml | 2 +- .nvmrc | 2 +- .stylelintrc | 10 +- eslint.config.js | 2 + generate-react-cli.json | 1 - package.json | 2 + pnpm-lock.yaml | 218 ++++++++++++++++++ postcss.config.js | 6 + src/lib/CounterDemo/Counter.module.css | 33 --- src/lib/CounterDemo/Counter.tsx | 10 +- .../__snapshots__/Counter.spec.tsx.snap | 9 +- src/lib/index.css | 3 + src/lib/index.ts | 2 + tailwind.config.js | 10 + templates/Component/TemplateName.module.css | 33 --- templates/Component/TemplateName.tsx | 10 +- vite.config.ts | 4 - 17 files changed, 273 insertions(+), 84 deletions(-) create mode 100644 postcss.config.js delete mode 100644 src/lib/CounterDemo/Counter.module.css create mode 100644 src/lib/index.css create mode 100644 tailwind.config.js delete mode 100644 templates/Component/TemplateName.module.css diff --git a/.github/workflows/pull-request-jobs.yml b/.github/workflows/pull-request-jobs.yml index f53d4ca..1522a5d 100644 --- a/.github/workflows/pull-request-jobs.yml +++ b/.github/workflows/pull-request-jobs.yml @@ -5,7 +5,7 @@ name: Node.js CI on: pull_request: - branches: [ master ] + branches: ["master", "tailwind"] jobs: lint-test: diff --git a/.nvmrc b/.nvmrc index 209e3ef..9a2a0e2 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20 +v20 diff --git a/.stylelintrc b/.stylelintrc index 886159b..118b9aa 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -15,7 +15,15 @@ "at-rule-no-vendor-prefix": true, "selector-no-vendor-prefix": true, "max-nesting-depth": 3, - "selector-max-compound-selectors": 5 + "selector-max-compound-selectors": 5, + "at-rule-no-unknown": [ + true, + { + "ignoreAtRules": [ + "tailwind" + ] + } + ] }, "plugins": [ "stylelint-order" diff --git a/eslint.config.js b/eslint.config.js index 602c59e..a7cf6e3 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -14,11 +14,13 @@ import pluginReactHooks from 'eslint-plugin-react-hooks'; import {fixupPluginRules} from '@eslint/compat'; import configPrettierRecommended from 'eslint-plugin-prettier/recommended'; import pluginSSR from 'eslint-plugin-ssr-friendly'; +import tailwindPlugin from 'eslint-plugin-tailwindcss'; export default [ eslint.configs.recommended, ...eslintTS.configs.recommended, ...eslintTS.configs.stylistic, + ...tailwindPlugin.configs['flat/recommended'], configReactRecommended, configReactJSXRuntime, configPrettierRecommended, diff --git a/generate-react-cli.json b/generate-react-cli.json index 6bca345..4b91b66 100644 --- a/generate-react-cli.json +++ b/generate-react-cli.json @@ -16,7 +16,6 @@ "withHookTest": true, "customTemplates": { "component": "templates/Component/TemplateName.tsx", - "style": "templates/Component/TemplateName.module.css", "story": "templates/Component/TemplateName.stories.tsx", "index": "templates/Component/index.ts", "mdx": "templates/Component/TemplateName.mdx", diff --git a/package.json b/package.json index f0a3cc8..7207dee 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,7 @@ "eslint-plugin-react-refresh": "0.4.7", "eslint-plugin-ssr-friendly": "1.3.0", "eslint-plugin-storybook": "0.8.0", + "eslint-plugin-tailwindcss": "3.17.4", "generate-react-cli": "8.4.6", "husky": "9.0.11", "identity-obj-proxy": "3.0.0", @@ -110,6 +111,7 @@ "stylelint-config-standard": "36.0.1", "stylelint-order": "6.0.4", "stylelint-prettier": "5.0.0", + "tailwindcss": "3.4.4", "ts-jest": "29.1.5", "ts-node": "10.9.2", "typescript": "5.5.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 94525eb..9faec0c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -108,6 +108,9 @@ importers: eslint-plugin-storybook: specifier: 0.8.0 version: 0.8.0(eslint@9.6.0)(typescript@5.5.2) + eslint-plugin-tailwindcss: + specifier: 3.17.4 + version: 3.17.4(tailwindcss@3.4.4(ts-node@10.9.2(@types/node@20.10.1)(typescript@5.5.2))) generate-react-cli: specifier: 8.4.6 version: 8.4.6 @@ -165,6 +168,9 @@ importers: stylelint-prettier: specifier: 5.0.0 version: 5.0.0(prettier@3.3.2)(stylelint@16.6.1(typescript@5.5.2)) + tailwindcss: + specifier: 3.4.4 + version: 3.4.4(ts-node@10.9.2(@types/node@20.10.1)(typescript@5.5.2)) ts-jest: specifier: 29.1.5 version: 29.1.5(@babel/core@7.24.6)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.6))(esbuild@0.20.2)(jest@29.7.0(@types/node@20.10.1)(ts-node@10.9.2(@types/node@20.10.1)(typescript@5.5.2)))(typescript@5.5.2) @@ -193,6 +199,10 @@ packages: '@adobe/css-tools@4.4.0': resolution: {integrity: sha512-Ff9+ksdQQB3rMncgqDK78uLznstjyfIf2Arnh22pW8kBpLs6rpKDwgnZT46hin5Hl1WzazzK64DOrhSwYpS7bQ==} + '@alloc/quick-lru@5.2.0': + resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} + engines: {node: '>=10'} + '@ampproject/remapping@2.2.1': resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} engines: {node: '>=6.0.0'} @@ -2708,6 +2718,9 @@ packages: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} + any-promise@1.3.0: + resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} @@ -2718,6 +2731,9 @@ packages: arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + arg@5.0.2: + resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} + argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} @@ -2989,6 +3005,10 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} + camelcase-css@2.0.1: + resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} + engines: {node: '>= 6'} + camelcase@5.3.1: resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} engines: {node: '>=6'} @@ -3144,6 +3164,10 @@ packages: resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} engines: {node: '>=18'} + commander@4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} + commander@6.2.1: resolution: {integrity: sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==} engines: {node: '>= 6'} @@ -3422,6 +3446,9 @@ packages: resolution: {integrity: sha512-aBzdj76lueB6uUst5iAs7+0H/oOjqI5D16XUWxlWMIMROhcM0rfsNVk93zTngq1dDNpoXRr++Sus7ETAExppAQ==} hasBin: true + didyoumean@1.2.2: + resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} + diff-sequences@29.6.3: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -3438,6 +3465,9 @@ packages: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} + dlv@1.1.3: + resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} + doctrine@2.1.0: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} @@ -3691,6 +3721,12 @@ packages: peerDependencies: eslint: '>=6' + eslint-plugin-tailwindcss@3.17.4: + resolution: {integrity: sha512-gJAEHmCq2XFfUP/+vwEfEJ9igrPeZFg+skeMtsxquSQdxba9XRk5bn0Bp9jxG1VV9/wwPKi1g3ZjItu6MIjhNg==} + engines: {node: '>=18.12.0'} + peerDependencies: + tailwindcss: ^3.4.0 + eslint-scope@5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} @@ -4698,6 +4734,10 @@ packages: node-notifier: optional: true + jiti@1.21.6: + resolution: {integrity: sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==} + hasBin: true + jju@1.4.0: resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} @@ -4820,6 +4860,10 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} + lilconfig@2.1.0: + resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} + engines: {node: '>=10'} + lilconfig@3.1.1: resolution: {integrity: sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==} engines: {node: '>=14'} @@ -5089,6 +5133,9 @@ packages: resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + mz@2.7.0: + resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + nanoid@3.3.7: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -5169,6 +5216,10 @@ packages: resolution: {integrity: sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==} engines: {node: '>=0.10.0'} + object-hash@3.0.0: + resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} + engines: {node: '>= 6'} + object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} @@ -5366,6 +5417,10 @@ packages: engines: {node: '>=0.10'} hasBin: true + pify@2.3.0: + resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} + engines: {node: '>=0.10.0'} + pify@4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} @@ -5487,18 +5542,48 @@ packages: peerDependencies: postcss: ^8.4 + postcss-import@15.1.0: + resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} + engines: {node: '>=14.0.0'} + peerDependencies: + postcss: ^8.0.0 + + postcss-js@4.0.1: + resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} + engines: {node: ^12 || ^14 || >= 16} + peerDependencies: + postcss: ^8.4.21 + postcss-lab-function@6.0.17: resolution: {integrity: sha512-QzjC6/3J6XKZzHGuUKhWNvlDMfWo+08dQOfQj4vWQdpZFdOxCh9QCR4w4XbV68EkdzywJie1mcm81jwFyV0+kg==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 + postcss-load-config@4.0.2: + resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} + engines: {node: '>= 14'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + postcss-logical@7.0.1: resolution: {integrity: sha512-8GwUQZE0ri0K0HJHkDv87XOLC8DE0msc+HoWLeKdtjDZEwpZ5xuK3QdV6FhmHSQW40LPkg43QzvATRAI3LsRkg==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 + postcss-nested@6.0.1: + resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} + engines: {node: '>=12.0'} + peerDependencies: + postcss: ^8.2.14 + postcss-nesting@12.1.5: resolution: {integrity: sha512-N1NgI1PDCiAGWPTYrwqm8wpjv0bgDmkYHH72pNsqTCv9CObxjxftdYu6AKtGN+pnJa7FQjMm3v4sp8QJbFsYdQ==} engines: {node: ^14 || ^16 || >=18} @@ -5739,6 +5824,9 @@ packages: resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} engines: {node: '>=0.10.0'} + read-cache@1.0.0: + resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} + read-package-json-fast@3.0.2: resolution: {integrity: sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -6250,6 +6338,11 @@ packages: engines: {node: '>=18.12.0'} hasBin: true + sucrase@3.35.0: + resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -6284,6 +6377,11 @@ packages: resolution: {integrity: sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==} engines: {node: '>=10.0.0'} + tailwindcss@3.4.4: + resolution: {integrity: sha512-ZoyXOdJjISB7/BcLTR6SEsLgKtDStYyYZVLsUtWChO4Ps20CBad7lfJKVDiejocV4ME1hLmyY0WJE3hSDcmQ2A==} + engines: {node: '>=14.0.0'} + hasBin: true + tar-fs@2.1.1: resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} @@ -6317,6 +6415,13 @@ packages: text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + thenify-all@1.6.0: + resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} + engines: {node: '>=0.8'} + + thenify@3.3.1: + resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + through2@2.0.5: resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} @@ -6385,6 +6490,9 @@ packages: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} engines: {node: '>=6.10'} + ts-interface-checker@0.1.13: + resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + ts-jest@29.1.5: resolution: {integrity: sha512-UuClSYxM7byvvYfyWdFI+/2UxMmwNyJb0NPkZPQE2hew3RurV7l7zURgOHAd/1I1ZdPpe3GUsXNXAcN8TFKSIg==} engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} @@ -6917,6 +7025,8 @@ snapshots: '@adobe/css-tools@4.4.0': {} + '@alloc/quick-lru@5.2.0': {} + '@ampproject/remapping@2.2.1': dependencies: '@jridgewell/gen-mapping': 0.3.5 @@ -10144,6 +10254,8 @@ snapshots: ansi-styles@6.2.1: {} + any-promise@1.3.0: {} + anymatch@3.1.3: dependencies: normalize-path: 3.0.0 @@ -10153,6 +10265,8 @@ snapshots: arg@4.1.3: {} + arg@5.0.2: {} + argparse@1.0.10: dependencies: sprintf-js: 1.0.3 @@ -10538,6 +10652,8 @@ snapshots: callsites@3.1.0: {} + camelcase-css@2.0.1: {} + camelcase@5.3.1: {} camelcase@6.3.0: {} @@ -10689,6 +10805,8 @@ snapshots: commander@12.1.0: {} + commander@4.1.1: {} + commander@6.2.1: {} commander@9.5.0: @@ -10932,6 +11050,8 @@ snapshots: transitivePeerDependencies: - supports-color + didyoumean@1.2.2: {} + diff-sequences@29.6.3: {} diff@4.0.2: {} @@ -10942,6 +11062,8 @@ snapshots: dependencies: path-type: 4.0.0 + dlv@1.1.3: {} + doctrine@2.1.0: dependencies: esutils: 2.0.3 @@ -11332,6 +11454,12 @@ snapshots: - supports-color - typescript + eslint-plugin-tailwindcss@3.17.4(tailwindcss@3.4.4(ts-node@10.9.2(@types/node@20.10.1)(typescript@5.5.2))): + dependencies: + fast-glob: 3.3.2 + postcss: 8.4.39 + tailwindcss: 3.4.4(ts-node@10.9.2(@types/node@20.10.1)(typescript@5.5.2)) + eslint-scope@5.1.1: dependencies: esrecurse: 4.3.0 @@ -12662,6 +12790,8 @@ snapshots: - supports-color - ts-node + jiti@1.21.6: {} + jju@1.4.0: {} js-tokens@4.0.0: {} @@ -12832,6 +12962,8 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 + lilconfig@2.1.0: {} + lilconfig@3.1.1: {} lines-and-columns@1.2.4: {} @@ -13083,6 +13215,12 @@ snapshots: mute-stream@1.0.0: {} + mz@2.7.0: + dependencies: + any-promise: 1.3.0 + object-assign: 4.1.1 + thenify-all: 1.6.0 + nanoid@3.3.7: {} nanomatch@1.2.13: @@ -13162,6 +13300,8 @@ snapshots: define-property: 0.2.5 kind-of: 3.2.2 + object-hash@3.0.0: {} + object-inspect@1.13.1: {} object-is@1.1.5: @@ -13366,6 +13506,8 @@ snapshots: pidtree@0.6.0: {} + pify@2.3.0: {} + pify@4.0.1: {} pirates@4.0.6: {} @@ -13482,6 +13624,18 @@ snapshots: postcss: 8.4.39 postcss-value-parser: 4.2.0 + postcss-import@15.1.0(postcss@8.4.39): + dependencies: + postcss: 8.4.39 + postcss-value-parser: 4.2.0 + read-cache: 1.0.0 + resolve: 1.22.8 + + postcss-js@4.0.1(postcss@8.4.39): + dependencies: + camelcase-css: 2.0.1 + postcss: 8.4.39 + postcss-lab-function@6.0.17(postcss@8.4.39): dependencies: '@csstools/css-color-parser': 2.0.3(@csstools/css-parser-algorithms@2.7.0(@csstools/css-tokenizer@2.3.2))(@csstools/css-tokenizer@2.3.2) @@ -13491,11 +13645,24 @@ snapshots: '@csstools/utilities': 1.0.0(postcss@8.4.39) postcss: 8.4.39 + postcss-load-config@4.0.2(postcss@8.4.39)(ts-node@10.9.2(@types/node@20.10.1)(typescript@5.5.2)): + dependencies: + lilconfig: 3.1.1 + yaml: 2.4.2 + optionalDependencies: + postcss: 8.4.39 + ts-node: 10.9.2(@types/node@20.10.1)(typescript@5.5.2) + postcss-logical@7.0.1(postcss@8.4.39): dependencies: postcss: 8.4.39 postcss-value-parser: 4.2.0 + postcss-nested@6.0.1(postcss@8.4.39): + dependencies: + postcss: 8.4.39 + postcss-selector-parser: 6.1.0 + postcss-nesting@12.1.5(postcss@8.4.39): dependencies: '@csstools/selector-resolve-nested': 1.1.0(postcss-selector-parser@6.1.0) @@ -13789,6 +13956,10 @@ snapshots: dependencies: loose-envify: 1.4.0 + read-cache@1.0.0: + dependencies: + pify: 2.3.0 + read-package-json-fast@3.0.2: dependencies: json-parse-even-better-errors: 3.0.2 @@ -14446,6 +14617,16 @@ snapshots: - supports-color - typescript + sucrase@3.35.0: + dependencies: + '@jridgewell/gen-mapping': 0.3.5 + commander: 4.1.1 + glob: 10.3.10 + lines-and-columns: 1.2.4 + mz: 2.7.0 + pirates: 4.0.6 + ts-interface-checker: 0.1.13 + supports-color@5.5.0: dependencies: has-flag: 3.0.0 @@ -14482,6 +14663,33 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 + tailwindcss@3.4.4(ts-node@10.9.2(@types/node@20.10.1)(typescript@5.5.2)): + dependencies: + '@alloc/quick-lru': 5.2.0 + arg: 5.0.2 + chokidar: 3.5.3 + didyoumean: 1.2.2 + dlv: 1.1.3 + fast-glob: 3.3.2 + glob-parent: 6.0.2 + is-glob: 4.0.3 + jiti: 1.21.6 + lilconfig: 2.1.0 + micromatch: 4.0.7 + normalize-path: 3.0.0 + object-hash: 3.0.0 + picocolors: 1.0.1 + postcss: 8.4.39 + postcss-import: 15.1.0(postcss@8.4.39) + postcss-js: 4.0.1(postcss@8.4.39) + postcss-load-config: 4.0.2(postcss@8.4.39)(ts-node@10.9.2(@types/node@20.10.1)(typescript@5.5.2)) + postcss-nested: 6.0.1(postcss@8.4.39) + postcss-selector-parser: 6.1.0 + resolve: 1.22.8 + sucrase: 3.35.0 + transitivePeerDependencies: + - ts-node + tar-fs@2.1.1: dependencies: chownr: 1.1.4 @@ -14531,6 +14739,14 @@ snapshots: text-table@0.2.0: {} + thenify-all@1.6.0: + dependencies: + thenify: 3.3.1 + + thenify@3.3.1: + dependencies: + any-promise: 1.3.0 + through2@2.0.5: dependencies: readable-stream: 2.3.8 @@ -14593,6 +14809,8 @@ snapshots: ts-dedent@2.2.0: {} + ts-interface-checker@0.1.13: {} + ts-jest@29.1.5(@babel/core@7.24.6)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.6))(esbuild@0.20.2)(jest@29.7.0(@types/node@20.10.1)(ts-node@10.9.2(@types/node@20.10.1)(typescript@5.5.2)))(typescript@5.5.2): dependencies: bs-logger: 0.2.6 diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..66b3d5d --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + 'postcss-preset-env': {}, + }, +}; diff --git a/src/lib/CounterDemo/Counter.module.css b/src/lib/CounterDemo/Counter.module.css deleted file mode 100644 index 6c807ae..0000000 --- a/src/lib/CounterDemo/Counter.module.css +++ /dev/null @@ -1,33 +0,0 @@ -.counter { - border: 1px solid lightgray; - font-family: sans-serif; - margin: 36px 24px; - padding: 24px; - text-align: center; - width: 240px; -} - -.header { - font-size: 24px; - font-weight: normal; - margin: 0 0 12px; -} - -.button { - background: lightseagreen; - border: none; - border-radius: 5px; - color: white; - cursor: pointer; - display: block; - font-size: 16px; - margin: 0 auto 24px; - padding: 12px 24px; - text-shadow: 1px 1px 1px rgb(0 0 0 / 50%); -} - -.button:active { - left: 1px; - position: relative; - top: 1px; -} diff --git a/src/lib/CounterDemo/Counter.tsx b/src/lib/CounterDemo/Counter.tsx index 807a35f..3eb7775 100644 --- a/src/lib/CounterDemo/Counter.tsx +++ b/src/lib/CounterDemo/Counter.tsx @@ -2,7 +2,6 @@ import type {FC} from 'react'; import {useEffect} from 'react'; import {throttle} from 'lodash'; -import classes from './Counter.module.css'; import useLogic from './useLogic'; export type Props = { @@ -21,9 +20,12 @@ export const Counter: FC = ({initialValue = 0}) => { }, []); return ( -
-

Counter

-
diff --git a/src/lib/CounterDemo/__snapshots__/Counter.spec.tsx.snap b/src/lib/CounterDemo/__snapshots__/Counter.spec.tsx.snap index 20570b5..4fbf01e 100644 --- a/src/lib/CounterDemo/__snapshots__/Counter.spec.tsx.snap +++ b/src/lib/CounterDemo/__snapshots__/Counter.spec.tsx.snap @@ -2,11 +2,16 @@ exports[`lib > Counter renders without crashing 1`] = ` -
-

+
+

Counter

diff --git a/vite.config.ts b/vite.config.ts index 7262189..7c58361 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,7 +5,6 @@ import react from '@vitejs/plugin-react'; import hq from 'alias-hq'; import external from '@yelo/rollup-node-external'; import dts from 'vite-plugin-dts'; -import postcssPresetEnv from 'postcss-preset-env'; // https://vitejs.dev/config/ export default defineConfig({ @@ -39,8 +38,5 @@ export default defineConfig({ modules: { localsConvention: 'camelCase', }, - postcss: { - plugins: [postcssPresetEnv({})], - }, }, });