tailwindcss-patch 2.2.0 → 2.2.2
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/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +5 -3
- package/package.json +2 -2
package/dist/cli.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const cac = require('cac');
|
|
4
|
+
const config = require('@tailwindcss-mangle/config');
|
|
4
5
|
const index = require('./index.cjs');
|
|
5
6
|
require('node:path');
|
|
6
7
|
require('node:fs');
|
|
@@ -10,7 +11,6 @@ require('@babel/types');
|
|
|
10
11
|
require('@babel/generator');
|
|
11
12
|
require('@babel/traverse');
|
|
12
13
|
require('@babel/parser');
|
|
13
|
-
const config = require('@tailwindcss-mangle/config');
|
|
14
14
|
require('semver');
|
|
15
15
|
require('postcss');
|
|
16
16
|
require('lilconfig');
|
package/dist/cli.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import cac from 'cac';
|
|
2
|
+
import { configName, getConfig, initConfig } from '@tailwindcss-mangle/config';
|
|
2
3
|
import { getPatchOptions, TailwindcssPatcher, createPatch } from './index.mjs';
|
|
3
4
|
import 'node:path';
|
|
4
5
|
import 'node:fs';
|
|
@@ -8,7 +9,6 @@ import '@babel/types';
|
|
|
8
9
|
import '@babel/generator';
|
|
9
10
|
import '@babel/traverse';
|
|
10
11
|
import '@babel/parser';
|
|
11
|
-
import { configName, getConfig, initConfig } from '@tailwindcss-mangle/config';
|
|
12
12
|
import 'semver';
|
|
13
13
|
import 'postcss';
|
|
14
14
|
import 'lilconfig';
|
package/dist/index.cjs
CHANGED
|
@@ -67,8 +67,10 @@ async function ensureDir(p) {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
function getTailwindcssEntry(basedir
|
|
71
|
-
return requireResolve("tailwindcss"
|
|
70
|
+
function getTailwindcssEntry(basedir) {
|
|
71
|
+
return requireResolve("tailwindcss", {
|
|
72
|
+
basedir
|
|
73
|
+
});
|
|
72
74
|
}
|
|
73
75
|
function getContexts(basedir) {
|
|
74
76
|
const twPath = getTailwindcssEntry(basedir);
|
|
@@ -555,6 +557,7 @@ class TailwindcssPatcher {
|
|
|
555
557
|
}
|
|
556
558
|
}
|
|
557
559
|
|
|
560
|
+
exports.defineConfig = config.defineConfig;
|
|
558
561
|
exports.CacheManager = CacheManager;
|
|
559
562
|
exports.TailwindcssPatcher = TailwindcssPatcher;
|
|
560
563
|
exports.createPatch = createPatch;
|
|
@@ -572,6 +575,3 @@ exports.inspectProcessTailwindFeaturesReturnContext = inspectProcessTailwindFeat
|
|
|
572
575
|
exports.internalPatch = internalPatch;
|
|
573
576
|
exports.monkeyPatchForExposingContext = monkeyPatchForExposingContext;
|
|
574
577
|
exports.requireResolve = requireResolve;
|
|
575
|
-
Object.keys(config).forEach(function (k) {
|
|
576
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = config[k];
|
|
577
|
-
});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Rule, Node } from 'postcss';
|
|
2
2
|
import { Config } from 'tailwindcss';
|
|
3
3
|
import { UserConfig } from '@tailwindcss-mangle/config';
|
|
4
|
-
export
|
|
4
|
+
export { defineConfig } from '@tailwindcss-mangle/config';
|
|
5
5
|
import { SyncOpts } from 'resolve';
|
|
6
6
|
|
|
7
7
|
type CacheStrategy = 'merge' | 'overwrite';
|
|
@@ -114,7 +114,7 @@ declare class TailwindcssPatcher {
|
|
|
114
114
|
removeUniversalSelector?: boolean;
|
|
115
115
|
}): Set<string>;
|
|
116
116
|
getContexts(basedir?: string): TailwindcssRuntimeContext[];
|
|
117
|
-
extract(options
|
|
117
|
+
extract(options?: UserConfig['patch']): Promise<string | undefined>;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
declare function getTailwindcssEntry(basedir?: string): string;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Rule, Node } from 'postcss';
|
|
2
2
|
import { Config } from 'tailwindcss';
|
|
3
3
|
import { UserConfig } from '@tailwindcss-mangle/config';
|
|
4
|
-
export
|
|
4
|
+
export { defineConfig } from '@tailwindcss-mangle/config';
|
|
5
5
|
import { SyncOpts } from 'resolve';
|
|
6
6
|
|
|
7
7
|
type CacheStrategy = 'merge' | 'overwrite';
|
|
@@ -114,7 +114,7 @@ declare class TailwindcssPatcher {
|
|
|
114
114
|
removeUniversalSelector?: boolean;
|
|
115
115
|
}): Set<string>;
|
|
116
116
|
getContexts(basedir?: string): TailwindcssRuntimeContext[];
|
|
117
|
-
extract(options
|
|
117
|
+
extract(options?: UserConfig['patch']): Promise<string | undefined>;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
declare function getTailwindcssEntry(basedir?: string): string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Rule, Node } from 'postcss';
|
|
2
2
|
import { Config } from 'tailwindcss';
|
|
3
3
|
import { UserConfig } from '@tailwindcss-mangle/config';
|
|
4
|
-
export
|
|
4
|
+
export { defineConfig } from '@tailwindcss-mangle/config';
|
|
5
5
|
import { SyncOpts } from 'resolve';
|
|
6
6
|
|
|
7
7
|
type CacheStrategy = 'merge' | 'overwrite';
|
|
@@ -114,7 +114,7 @@ declare class TailwindcssPatcher {
|
|
|
114
114
|
removeUniversalSelector?: boolean;
|
|
115
115
|
}): Set<string>;
|
|
116
116
|
getContexts(basedir?: string): TailwindcssRuntimeContext[];
|
|
117
|
-
extract(options
|
|
117
|
+
extract(options?: UserConfig['patch']): Promise<string | undefined>;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
declare function getTailwindcssEntry(basedir?: string): string;
|
package/dist/index.mjs
CHANGED
|
@@ -19,7 +19,7 @@ import __cjs_mod__ from 'module';
|
|
|
19
19
|
const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
20
20
|
const __dirname = __cjs_path__.dirname(__filename);
|
|
21
21
|
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
22
|
-
export
|
|
22
|
+
export { defineConfig } from '@tailwindcss-mangle/config';
|
|
23
23
|
|
|
24
24
|
const { sync } = pkg;
|
|
25
25
|
function ensureFileContent(filepaths) {
|
|
@@ -50,8 +50,10 @@ async function ensureDir(p) {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
function getTailwindcssEntry(basedir
|
|
54
|
-
return requireResolve("tailwindcss"
|
|
53
|
+
function getTailwindcssEntry(basedir) {
|
|
54
|
+
return requireResolve("tailwindcss", {
|
|
55
|
+
basedir
|
|
56
|
+
});
|
|
55
57
|
}
|
|
56
58
|
function getContexts(basedir) {
|
|
57
59
|
const twPath = getTailwindcssEntry(basedir);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwindcss-patch",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "patch tailwindcss for exposing context and extract classes",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"postcss": "^8.4.29",
|
|
52
52
|
"resolve": "^1.22.5",
|
|
53
53
|
"semver": "^7.5.4",
|
|
54
|
-
"@tailwindcss-mangle/config": "^2.2.
|
|
54
|
+
"@tailwindcss-mangle/config": "^2.2.2"
|
|
55
55
|
},
|
|
56
56
|
"homepage": "https://github.com/sonofmagic/tailwindcss-mangle",
|
|
57
57
|
"repository": {
|