tailwindcss-patch 2.0.2 → 2.0.3
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 -0
- package/dist/cli.mjs +1 -0
- package/dist/index.cjs +7 -2
- package/dist/index.mjs +6 -2
- package/package.json +3 -2
package/dist/cli.cjs
CHANGED
package/dist/cli.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -11,6 +11,7 @@ const traverse = require('@babel/traverse');
|
|
|
11
11
|
const parser = require('@babel/parser');
|
|
12
12
|
const postcss = require('postcss');
|
|
13
13
|
const lilconfig = require('lilconfig');
|
|
14
|
+
const createJiti = require('jiti');
|
|
14
15
|
const config = require('@tailwindcss-mangle/config');
|
|
15
16
|
|
|
16
17
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
@@ -35,6 +36,7 @@ const t__namespace = /*#__PURE__*/_interopNamespaceCompat(t);
|
|
|
35
36
|
const generate__default = /*#__PURE__*/_interopDefaultCompat(generate);
|
|
36
37
|
const traverse__default = /*#__PURE__*/_interopDefaultCompat(traverse);
|
|
37
38
|
const postcss__default = /*#__PURE__*/_interopDefaultCompat(postcss);
|
|
39
|
+
const createJiti__default = /*#__PURE__*/_interopDefaultCompat(createJiti);
|
|
38
40
|
|
|
39
41
|
const { sync } = pkg__default;
|
|
40
42
|
function ensureFileContent(filepaths) {
|
|
@@ -441,6 +443,7 @@ function internalPatch(pkgJsonPath, options) {
|
|
|
441
443
|
}
|
|
442
444
|
}
|
|
443
445
|
|
|
446
|
+
const jiti = createJiti__default(__filename);
|
|
444
447
|
async function processTailwindcss(options) {
|
|
445
448
|
options.cwd = options.cwd ?? process.cwd();
|
|
446
449
|
let config = options.config;
|
|
@@ -450,8 +453,10 @@ async function processTailwindcss(options) {
|
|
|
450
453
|
searchPlaces: [`${moduleName}.config.js`, `${moduleName}.config.cjs`],
|
|
451
454
|
loaders: {
|
|
452
455
|
// 默认支持 js 和 cjs 2种格式
|
|
453
|
-
".js":
|
|
454
|
-
".cjs":
|
|
456
|
+
".js": jiti,
|
|
457
|
+
".cjs": jiti,
|
|
458
|
+
".ts": jiti,
|
|
459
|
+
".mjs": jiti
|
|
455
460
|
}
|
|
456
461
|
}).search(options.cwd);
|
|
457
462
|
if (!result) {
|
package/dist/index.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import traverse from '@babel/traverse';
|
|
|
9
9
|
import { parse } from '@babel/parser';
|
|
10
10
|
import postcss from 'postcss';
|
|
11
11
|
import { lilconfig } from 'lilconfig';
|
|
12
|
+
import createJiti from 'jiti';
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
// -- Unbuild CommonJS Shims --
|
|
@@ -425,6 +426,7 @@ function internalPatch(pkgJsonPath, options) {
|
|
|
425
426
|
}
|
|
426
427
|
}
|
|
427
428
|
|
|
429
|
+
const jiti = createJiti(__filename);
|
|
428
430
|
async function processTailwindcss(options) {
|
|
429
431
|
options.cwd = options.cwd ?? process.cwd();
|
|
430
432
|
let config = options.config;
|
|
@@ -434,8 +436,10 @@ async function processTailwindcss(options) {
|
|
|
434
436
|
searchPlaces: [`${moduleName}.config.js`, `${moduleName}.config.cjs`],
|
|
435
437
|
loaders: {
|
|
436
438
|
// 默认支持 js 和 cjs 2种格式
|
|
437
|
-
".js":
|
|
438
|
-
".cjs":
|
|
439
|
+
".js": jiti,
|
|
440
|
+
".cjs": jiti,
|
|
441
|
+
".ts": jiti,
|
|
442
|
+
".mjs": jiti
|
|
439
443
|
}
|
|
440
444
|
}).search(options.cwd);
|
|
441
445
|
if (!result) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwindcss-patch",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "patch tailwindcss for exposing context and extract classes",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -62,11 +62,12 @@
|
|
|
62
62
|
"@babel/traverse": "^7.22.10",
|
|
63
63
|
"@babel/types": "^7.22.10",
|
|
64
64
|
"cac": "^6.7.14",
|
|
65
|
+
"jiti": "^1.19.1",
|
|
65
66
|
"lilconfig": "^2.1.0",
|
|
66
67
|
"postcss": "^8.4.27",
|
|
67
68
|
"resolve": "^1.22.4",
|
|
68
69
|
"semver": "^7.5.4",
|
|
69
|
-
"@tailwindcss-mangle/config": "^1.0.
|
|
70
|
+
"@tailwindcss-mangle/config": "^1.0.1"
|
|
70
71
|
},
|
|
71
72
|
"homepage": "https://github.com/sonofmagic/tailwindcss-mangle",
|
|
72
73
|
"repository": {
|