Skip to content

Commit 645c7b6

Browse files
authored
Remove Tailwind CSS v3.3 warning (#28)
* Remove Tailwind CSS v3.3 warning * Update changelog
1 parent 9b1fc08 commit 645c7b6

File tree

4 files changed

+9
-22
lines changed

4 files changed

+9
-22
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
- Nothing yet!
10+
- Remove Tailwind CSS v3.3 warning ([#28](https://github.com/tailwindlabs/tailwindcss-line-clamp/pull/28))
1111

1212
## [0.4.3] - 2023-03-30
1313

package-lock.json

+8-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

-3
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,5 @@
3030
"setupFilesAfterEnv": [
3131
"<rootDir>/jest/customMatchers.js"
3232
]
33-
},
34-
"dependencies": {
35-
"semver": "^7.3.8"
3633
}
3734
}

src/index.js

-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
const semver = require('semver')
2-
const tailwindPkg = require('tailwindcss/package.json')
31
const plugin = require('tailwindcss/plugin')
42

53
const baseStyles = {
@@ -10,17 +8,6 @@ const baseStyles = {
108

119
const lineClamp = plugin(
1210
function ({ matchUtilities, addUtilities, theme, variants }) {
13-
if (semver.gte(tailwindPkg.version, '3.3.0')) {
14-
console.log(
15-
`\u001b[31m${[
16-
'As of Tailwind CSS v3.3, the `@tailwindcss/line-clamp` plugin is now included by default.',
17-
'Remove it from the `plugins` array in your configuration to eliminate this warning.',
18-
].join('\n')}\u001b[0m`
19-
)
20-
21-
return
22-
}
23-
2411
const values = theme('lineClamp')
2512

2613
matchUtilities(

0 commit comments

Comments
 (0)