Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Node.js CI

on:
pull_request:
branches: [ master ]
branches: ["master", "tailwind"]

concurrency:
group: "checks-${{ github.head_ref || github.ref }}"
Expand Down
10 changes: 9 additions & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ import configReactJSXRuntime from 'eslint-plugin-react/configs/jsx-runtime.js';
import pluginReactHooks from 'eslint-plugin-react-hooks';
import {fixupPluginRules} from '@eslint/compat';
import configPrettierRecommended from 'eslint-plugin-prettier/recommended';
import tailwindPlugin from 'eslint-plugin-tailwindcss';

export default [
eslint.configs.recommended,
...eslintTS.configs.recommended,
...eslintTS.configs.stylistic,
...tailwindPlugin.configs['flat/recommended'],
configReactRecommended,
configReactJSXRuntime,
configPrettierRecommended,
Expand Down
1 change: 0 additions & 1 deletion generate-react-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
"eslint-plugin-react-refresh": "0.5.7",
"eslint-plugin-ssr-friendly": "1.3.0",
"eslint-plugin-storybook": "10.6.2",
"eslint-plugin-tailwindcss": "3.18.3",
"generate-react-cli": "8.4.9",
"husky": "9.1.7",
"identity-obj-proxy": "3.0.0",
"is-ci": "4.1.0",
Expand All @@ -102,6 +104,8 @@
"stylelint-config-standard": "39.0.1",
"stylelint-order": "7.0.1",
"stylelint-prettier": "5.0.3",
"tailwindcss": "3.4.19",
"ts-jest": "29.4.0",
"ts-node": "10.9.2",
"typescript": "5.9.3",
"typescript-eslint": "8.71.2",
Expand Down
3,164 changes: 3,023 additions & 141 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
allowBuilds:
'@parcel/watcher': true
esbuild: true
unrs-resolver: true
6 changes: 6 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
'postcss-preset-env': {},
},
};
33 changes: 0 additions & 33 deletions src/lib/CounterDemo/Counter.module.css

This file was deleted.

10 changes: 6 additions & 4 deletions src/lib/CounterDemo/Counter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -21,9 +20,12 @@ export const Counter: FC<Props> = ({initialValue = 0}) => {
}, []);

return (
<div className={classes.counter}>
<h2 className={classes.header}>Counter</h2>
<button className={classes.button} type="button" onClick={incrementCount}>
<div className="w-60 border border-slate-300 p-6 text-center">
<h2 className="mb-3 text-2xl">Counter</h2>
<button
className="mb-6 rounded-lg bg-teal-600 px-6 py-3 text-base text-white drop-shadow-md active:relative active:left-0.5 active:top-0.5 active:drop-shadow-none"
type="button"
onClick={incrementCount}>
Increment by one
</button>
<div>
Expand Down
3 changes: 3 additions & 0 deletions src/lib/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
2 changes: 2 additions & 0 deletions src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
import './index.css';

export {Counter} from './CounterDemo';
10 changes: 10 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// const defaultTheme = require('tailwindcss/defaultTheme');

/** @type {import('tailwindcss').Config} */
export default {
content: ['./index.html', './src/**/*.tsx'],
theme: {
extend: {},
},
plugins: [],
};
4 changes: 0 additions & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import react from '@vitejs/plugin-react';
import {kitchen} from 'alias-kitchen';
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({
Expand Down Expand Up @@ -39,8 +38,5 @@ export default defineConfig({
modules: {
localsConvention: 'camelCase',
},
postcss: {
plugins: [postcssPresetEnv({stage: 1})],
},
},
});