tailwindcss-patch 0.0.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -6
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -22,19 +22,27 @@ npx tw-patch
|
|
|
22
22
|
|
|
23
23
|
```json
|
|
24
24
|
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
/* ... */
|
|
26
|
+
"scripts": {
|
|
27
|
+
"prepare": "tw-patch"
|
|
28
|
+
}
|
|
29
29
|
}
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
## Usage
|
|
33
33
|
|
|
34
34
|
```js
|
|
35
|
-
import { getContexts
|
|
35
|
+
import { getContexts, getClassCacheSet } from 'tailwindcss-patch'
|
|
36
36
|
// get all contexts at runtime
|
|
37
|
-
getContexts()
|
|
37
|
+
getContexts()
|
|
38
38
|
// get all class generated by tailwindcss utilities
|
|
39
39
|
getClassCacheSet()
|
|
40
40
|
```
|
|
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`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwindcss-patch",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "patch tailwindcss for exposing context",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -36,14 +36,19 @@
|
|
|
36
36
|
"@babel/parser": "^7.21.4",
|
|
37
37
|
"@babel/traverse": "^7.21.4",
|
|
38
38
|
"@babel/types": "^7.21.4",
|
|
39
|
-
"semver": "^7.
|
|
39
|
+
"semver": "^7.4.0"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://github.com/sonofmagic/tailwindcss-mangle",
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "git",
|
|
44
|
+
"url": "git+https://github.com/sonofmagic/tailwindcss-mangle.git"
|
|
40
45
|
},
|
|
41
46
|
"scripts": {
|
|
42
47
|
"dev": "cross-env NODE_ENV=development rollup -cw",
|
|
43
48
|
"build": "cross-env NODE_ENV=production rollup -c",
|
|
44
49
|
"dev:tsc": "tsc -p tsconfig.json --sourceMap",
|
|
45
50
|
"build:tsc": "tsc -p tsconfig.json",
|
|
46
|
-
"test": "jest",
|
|
51
|
+
"test": "npm run patch && jest",
|
|
47
52
|
"postinstall": "echo postinstall",
|
|
48
53
|
"preinstall": "npx only-allow pnpm",
|
|
49
54
|
"patch": "ts-node src/cli.ts"
|