Skip to content

Commit 69c0f65

Browse files
committed
chore: release tailwindcss-patch 1.0.0
1 parent d3ebc06 commit 69c0f65

File tree

9 files changed

+62
-50
lines changed

9 files changed

+62
-50
lines changed

apps/vite-react/src/App.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,12 @@ function App() {
1818
</div>
1919
<h1>Vite + React</h1>
2020
<div className="card">
21-
<button onClick={() => setCount((count) => count + 1)}>
22-
count is {count}
23-
</button>
21+
<button onClick={() => setCount((count) => count + 1)}>count is {count}</button>
2422
<p>
2523
Edit <code>src/App.tsx</code> and save to test HMR
2624
</p>
2725
</div>
28-
<p className="read-the-docs">
29-
Click on the Vite and React logos to learn more
30-
</p>
26+
<p className="read-the-docs">Click on the Vite and React logos to learn more</p>
3127
</div>
3228
)
3329
}

apps/vite-react/src/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ import './index.css'
66
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
77
<React.StrictMode>
88
<App />
9-
</React.StrictMode>,
9+
</React.StrictMode>
1010
)

apps/vite-react/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import react from '@vitejs/plugin-react'
33

44
// https://vitejs.dev/config/
55
export default defineConfig({
6-
plugins: [react()],
6+
plugins: [react()]
77
})

apps/vite-svelte/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import './app.css'
22
import App from './App.svelte'
33

44
const app = new App({
5-
target: document.getElementById('app'),
5+
target: document.getElementById('app')
66
})
77

88
export default app

apps/vite-svelte/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import { svelte } from '@sveltejs/vite-plugin-svelte'
33

44
// https://vitejs.dev/config/
55
export default defineConfig({
6-
plugins: [svelte()],
6+
plugins: [svelte()]
77
})

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"rollup": "^3.20.2",
3131
"ts-jest": "^29.1.0",
3232
"ts-node": "^10.9.1",
33-
"turbo": "^1.8.8",
33+
"turbo": "^1.9.0",
3434
"typescript": "^5.0.4"
3535
},
3636
"engines": {

packages/tailwindcss-patch/README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,27 @@ npx tw-patch
2222

2323
```json
2424
{
25-
/* ... */
26-
"scripts": {
27-
"prepare": "tw-patch"
28-
}
25+
/* ... */
26+
"scripts": {
27+
"prepare": "tw-patch"
28+
}
2929
}
3030
```
3131

3232
## Usage
3333

3434
```js
35-
import { getContexts , getClassCacheSet } from 'tailwindcss-patch'
35+
import { getContexts, getClassCacheSet } from 'tailwindcss-patch'
3636
// get all contexts at runtime
37-
getContexts()
37+
getContexts()
3838
// get all class generated by tailwindcss utilities
3939
getClassCacheSet()
4040
```
41+
42+
## Notice
43+
44+
`getContexts`,`getClassCacheSet` should be invoked after `postcss-loader`'s activation.
45+
46+
which means you may not get tailwindcss contexts at build start time.
47+
48+
you may call them at `generateBundle` lifetime hook in `vite/webpack plugin`.

packages/tailwindcss-patch/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tailwindcss-patch",
3-
"version": "0.0.1",
3+
"version": "1.0.0",
44
"description": "patch tailwindcss for exposing context",
55
"main": "dist/index.js",
66
"types": "dist/types/index.d.ts",
@@ -47,7 +47,7 @@
4747
"@babel/parser": "^7.21.4",
4848
"@babel/traverse": "^7.21.4",
4949
"@babel/types": "^7.21.4",
50-
"semver": "^7.3.8"
50+
"semver": "^7.4.0"
5151
},
5252
"homepage": "https://github.com/sonofmagic/tailwindcss-mangle",
5353
"repository": {

pnpm-lock.yaml

Lines changed: 39 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)