Skip to content

Commit f5179e6

Browse files
committed
chore: remove tailwind and use plain css
1 parent 5caa072 commit f5179e6

13 files changed

+324
-450
lines changed

.github/FUNDING.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# These are supported funding model platforms
2+
3+
github: [danielbarion] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.prettierrc.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@
66
"trailingComma": "all",
77
"tabWidth": 2,
88
"printWidth": 100,
9-
"bracketSameLine": false,
109
"endOfLine": "auto"
11-
}
10+
}

package.json

+9-12
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,18 @@
3535
"@babel/plugin-proposal-class-properties": "^7.14.5",
3636
"@babel/preset-env": "^7.15.6",
3737
"@babel/preset-react": "^7.14.5",
38-
"@rollup/plugin-babel": "^5.3.0",
39-
"@rollup/plugin-commonjs": "22.0.2",
40-
"@rollup/plugin-json": "^4.1.0",
41-
"@rollup/plugin-node-resolve": "14.1.0",
42-
"@rollup/plugin-replace": "^4.0.0",
43-
"@rollup/plugin-typescript": "^8.5.0",
38+
"@rollup/plugin-babel": "6.0.2",
39+
"@rollup/plugin-commonjs": "23.0.2",
40+
"@rollup/plugin-node-resolve": "15.0.1",
41+
"@rollup/plugin-replace": "5.0.1",
42+
"@rollup/plugin-typescript": "9.0.2",
4443
"@types/css": "^0.0.33",
4544
"@types/css-modules": "^1.0.2",
4645
"@types/react": "^18.0.21",
4746
"@types/react-dom": "^18.0.6",
4847
"@typescript-eslint/eslint-plugin": "^5.42.1",
4948
"@typescript-eslint/parser": "^5.42.1",
50-
"autoprefixer": "^10.4.13",
51-
"babel-loader": "^8.2.2",
49+
"babel-loader": "9.1.0",
5250
"babel-plugin-module-resolver": "^4.1.0",
5351
"commitizen": "^4.2.5",
5452
"css-loader": "^6.3.0",
@@ -63,16 +61,16 @@
6361
"eslint-plugin-react": "^7.26.0",
6462
"eslint-plugin-react-hooks": "^4.2.0",
6563
"husky": "^8.0.1",
66-
"lint-staged": "^11.1.2",
67-
"postcss": "^8.4.18",
64+
"lint-staged": "13.0.3",
65+
"postcss": "8.4.19",
6866
"prettier": "^2.4.1",
6967
"process": "^0.11.10",
7068
"prop-types": "^15.7.2",
7169
"react": "18.2.0",
7270
"react-dom": "18.2.0",
7371
"react-test-renderer": "18.2.0",
7472
"rimraf": "^3.0.2",
75-
"rollup": "^2.57.0",
73+
"rollup": "3.2.5",
7674
"rollup-plugin-analyzer": "^4.0.0",
7775
"rollup-plugin-browsersync": "^1.3.3",
7876
"rollup-plugin-copy": "^3.4.0",
@@ -87,7 +85,6 @@
8785
"stylelint": "^13.13.1",
8886
"stylelint-config-prettier": "^8.0.2",
8987
"stylelint-config-standard": "^22.0.0",
90-
"tailwindcss": "^3.2.3",
9188
"typescript": "^4.8.4"
9289
},
9390
"peerDependencies": {

rollup.config.dev.js

+4-13
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { string } from 'rollup-plugin-string'
33
import analyze from 'rollup-plugin-analyzer'
44
import commonjs from '@rollup/plugin-commonjs'
55
import filesize from 'rollup-plugin-filesize'
6-
import json from '@rollup/plugin-json/dist'
76
import postcss from 'rollup-plugin-postcss'
87
import progress from 'rollup-plugin-progress'
98
import browsersync from 'rollup-plugin-browsersync'
@@ -13,9 +12,6 @@ import copy from 'rollup-plugin-copy'
1312
import { nodeResolve } from '@rollup/plugin-node-resolve'
1413
import ts from '@rollup/plugin-typescript'
1514
import typescript from 'typescript'
16-
import tailwindcss from 'tailwindcss'
17-
import autoprefixer from 'autoprefixer'
18-
import tailwindConfig from './tailwind.config'
1915

2016
const input = ['src/index-dev.tsx']
2117

@@ -47,16 +43,9 @@ const plugins = [
4743
autoModules: true,
4844
include: '**/*.css',
4945
extensions: ['.css'],
50-
plugins: [autoprefixer(), tailwindcss(tailwindConfig)],
51-
}),
52-
json(),
53-
nodeResolve({
54-
browser: true,
55-
56-
// Add this line for development config, omit for
57-
// production config
58-
exportConditions: ['development'],
46+
plugins: [],
5947
}),
48+
nodeResolve(),
6049
ts({
6150
typescript,
6251
tsconfig: './tsconfig.json',
@@ -84,6 +73,8 @@ const plugins = [
8473
browsersync({
8574
server: 'build',
8675
watch: true,
76+
ui: false,
77+
open: false,
8778
// port: 3000,
8879
// ui: {
8980
// port: 3001,

src/App.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ import {
1313
FloatingPortal,
1414
} from '@floating-ui/react-dom-interactions'
1515
import { Tooltip } from 'components/Tooltip'
16+
import styles from './styles.module.css'
1617

1718
function App() {
18-
const [open, setOpen] = useState(true)
19+
const [open, setOpen] = useState(false)
1920

2021
const { x, y, reference, floating, strategy, context } = useFloating({
2122
open,
@@ -37,7 +38,7 @@ function App() {
3738
const { getReferenceProps, getFloatingProps } = useInteractions([hover, focus, dismiss, role])
3839

3940
return (
40-
<>
41+
<main className={styles['main']}>
4142
<button ref={reference} {...getReferenceProps()}>
4243
Hover or focus me
4344
</button>
@@ -52,7 +53,7 @@ function App() {
5253
/>
5354
)}
5455
</FloatingPortal>
55-
</>
56+
</main>
5657
)
5758
}
5859

src/components/Tooltip/Tooltip.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const Tooltip = ({ innerRef, strategy, y, x, floatingProps }: ITooltip) => {
1515
}}
1616
{...floatingProps}
1717
>
18-
I'm a tooltip!
18+
Hello World from a Tooltip
1919
</div>
2020
)
2121
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.tooltip {
2-
@apply bg-purple-500;
2+
background-color: red;
33
}

src/index-dev.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { createRoot } from 'react-dom/client'
2-
import './tailwind.module.css'
32
import App from './App'
43

54
const container = document.getElementById('app')

src/index.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
import './tailwind.module.css'
2-
31
export { default as App } from './App'

src/styles.module.css

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.main {
2+
display: flex;
3+
justify-content: center;
4+
align-items: center;
5+
width: 100%;
6+
height: 100vh;
7+
}

src/tailwind.module.css

-3
This file was deleted.

tailwind.config.js

-15
This file was deleted.

0 commit comments

Comments
 (0)