tailwindcss-injector 1.0.2 → 1.0.3-alpha.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/dist/postcss.cjs CHANGED
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  mod
28
28
  ));
29
29
 
30
- // ../../node_modules/.pnpm/tsup@8.4.0_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.2_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js
30
+ // ../../node_modules/.pnpm/tsup@8.5.0_@swc+core@1.12.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_typescript@5.8.3_yaml@2.8.0/node_modules/tsup/assets/cjs_shims.js
31
31
  var init_cjs_shims = __esm({
32
- "../../node_modules/.pnpm/tsup@8.4.0_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.2_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js"() {
32
+ "../../node_modules/.pnpm/tsup@8.5.0_@swc+core@1.12.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_typescript@5.8.3_yaml@2.8.0/node_modules/tsup/assets/cjs_shims.js"() {
33
33
  "use strict";
34
34
  }
35
35
  });
@@ -14,4 +14,6 @@ interface Options {
14
14
 
15
15
  declare const creator: PluginCreator<Partial<Options>>;
16
16
 
17
- export { type Options, creator as default };
17
+ // @ts-ignore
18
+ export = creator;
19
+ export type { Options };
package/dist/postcss.js CHANGED
@@ -27,9 +27,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  mod
28
28
  ));
29
29
 
30
- // ../../node_modules/.pnpm/tsup@8.4.0_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.2_yaml@2.7.0/node_modules/tsup/assets/esm_shims.js
30
+ // ../../node_modules/.pnpm/tsup@8.5.0_@swc+core@1.12.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_typescript@5.8.3_yaml@2.8.0/node_modules/tsup/assets/esm_shims.js
31
+ import path from "path";
32
+ import { fileURLToPath } from "url";
31
33
  var init_esm_shims = __esm({
32
- "../../node_modules/.pnpm/tsup@8.4.0_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.2_yaml@2.7.0/node_modules/tsup/assets/esm_shims.js"() {
34
+ "../../node_modules/.pnpm/tsup@8.5.0_@swc+core@1.12.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_typescript@5.8.3_yaml@2.8.0/node_modules/tsup/assets/esm_shims.js"() {
33
35
  "use strict";
34
36
  }
35
37
  });
@@ -181,9 +183,9 @@ var require_set_value = __commonJS({
181
183
  }
182
184
  return obj;
183
185
  };
184
- var setValue = (target, path2, value, options) => {
185
- if (!path2 || !isObject(target)) return target;
186
- const keys = split(path2, options);
186
+ var setValue = (target, path3, value, options) => {
187
+ if (!path3 || !isObject(target)) return target;
188
+ const keys = split(path3, options);
187
189
  let obj = target;
188
190
  for (let i = 0; i < keys.length; i++) {
189
191
  const key = keys[i];
@@ -222,11 +224,11 @@ import { loadConfig } from "tailwindcss-config";
222
224
 
223
225
  // src/config.ts
224
226
  init_esm_shims();
225
- import process2 from "node:process";
227
+ import process2 from "process";
226
228
 
227
229
  // src/utils.ts
228
230
  init_esm_shims();
229
- import crypto from "node:crypto";
231
+ import crypto from "crypto";
230
232
  import { defu, defuOverrideArray, isRegexp, regExpTest } from "@weapp-tailwindcss/shared";
231
233
 
232
234
  // ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.mjs
@@ -392,12 +394,12 @@ var _lazyMatch = () => {
392
394
  return __lib__.default || __lib__;
393
395
  };
394
396
  var _match;
395
- var zeptomatch = (path2, pattern) => {
397
+ var zeptomatch = (path3, pattern) => {
396
398
  if (!_match) {
397
399
  _match = _lazyMatch();
398
400
  _lazyMatch = null;
399
401
  }
400
- return _match(path2, pattern);
402
+ return _match(path3, pattern);
401
403
  };
402
404
  var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
403
405
  function normalizeWindowsPath(input = "") {
@@ -413,55 +415,55 @@ var _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
413
415
  var _EXTNAME_RE = /.(\.[^./]+|\.)$/;
414
416
  var _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
415
417
  var sep = "/";
416
- var normalize = function(path2) {
417
- if (path2.length === 0) {
418
+ var normalize = function(path3) {
419
+ if (path3.length === 0) {
418
420
  return ".";
419
421
  }
420
- path2 = normalizeWindowsPath(path2);
421
- const isUNCPath = path2.match(_UNC_REGEX);
422
- const isPathAbsolute = isAbsolute(path2);
423
- const trailingSeparator = path2[path2.length - 1] === "/";
424
- path2 = normalizeString(path2, !isPathAbsolute);
425
- if (path2.length === 0) {
422
+ path3 = normalizeWindowsPath(path3);
423
+ const isUNCPath = path3.match(_UNC_REGEX);
424
+ const isPathAbsolute = isAbsolute(path3);
425
+ const trailingSeparator = path3[path3.length - 1] === "/";
426
+ path3 = normalizeString(path3, !isPathAbsolute);
427
+ if (path3.length === 0) {
426
428
  if (isPathAbsolute) {
427
429
  return "/";
428
430
  }
429
431
  return trailingSeparator ? "./" : ".";
430
432
  }
431
433
  if (trailingSeparator) {
432
- path2 += "/";
434
+ path3 += "/";
433
435
  }
434
- if (_DRIVE_LETTER_RE.test(path2)) {
435
- path2 += "/";
436
+ if (_DRIVE_LETTER_RE.test(path3)) {
437
+ path3 += "/";
436
438
  }
437
439
  if (isUNCPath) {
438
440
  if (!isPathAbsolute) {
439
- return `//./${path2}`;
441
+ return `//./${path3}`;
440
442
  }
441
- return `//${path2}`;
443
+ return `//${path3}`;
442
444
  }
443
- return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2;
445
+ return isPathAbsolute && !isAbsolute(path3) ? `/${path3}` : path3;
444
446
  };
445
447
  var join = function(...segments) {
446
- let path2 = "";
448
+ let path3 = "";
447
449
  for (const seg of segments) {
448
450
  if (!seg) {
449
451
  continue;
450
452
  }
451
- if (path2.length > 0) {
452
- const pathTrailing = path2[path2.length - 1] === "/";
453
+ if (path3.length > 0) {
454
+ const pathTrailing = path3[path3.length - 1] === "/";
453
455
  const segLeading = seg[0] === "/";
454
456
  const both = pathTrailing && segLeading;
455
457
  if (both) {
456
- path2 += seg.slice(1);
458
+ path3 += seg.slice(1);
457
459
  } else {
458
- path2 += pathTrailing || segLeading ? seg : `/${seg}`;
460
+ path3 += pathTrailing || segLeading ? seg : `/${seg}`;
459
461
  }
460
462
  } else {
461
- path2 += seg;
463
+ path3 += seg;
462
464
  }
463
465
  }
464
- return normalize(path2);
466
+ return normalize(path3);
465
467
  };
466
468
  function cwd() {
467
469
  if (typeof process !== "undefined" && typeof process.cwd === "function") {
@@ -474,12 +476,12 @@ var resolve = function(...arguments_) {
474
476
  let resolvedPath = "";
475
477
  let resolvedAbsolute = false;
476
478
  for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
477
- const path2 = index >= 0 ? arguments_[index] : cwd();
478
- if (!path2 || path2.length === 0) {
479
+ const path3 = index >= 0 ? arguments_[index] : cwd();
480
+ if (!path3 || path3.length === 0) {
479
481
  continue;
480
482
  }
481
- resolvedPath = `${path2}/${resolvedPath}`;
482
- resolvedAbsolute = isAbsolute(path2);
483
+ resolvedPath = `${path3}/${resolvedPath}`;
484
+ resolvedAbsolute = isAbsolute(path3);
483
485
  }
484
486
  resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
485
487
  if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
@@ -487,15 +489,15 @@ var resolve = function(...arguments_) {
487
489
  }
488
490
  return resolvedPath.length > 0 ? resolvedPath : ".";
489
491
  };
490
- function normalizeString(path2, allowAboveRoot) {
492
+ function normalizeString(path3, allowAboveRoot) {
491
493
  let res = "";
492
494
  let lastSegmentLength = 0;
493
495
  let lastSlash = -1;
494
496
  let dots = 0;
495
497
  let char = null;
496
- for (let index = 0; index <= path2.length; ++index) {
497
- if (index < path2.length) {
498
- char = path2[index];
498
+ for (let index = 0; index <= path3.length; ++index) {
499
+ if (index < path3.length) {
500
+ char = path3[index];
499
501
  } else if (char === "/") {
500
502
  break;
501
503
  } else {
@@ -531,9 +533,9 @@ function normalizeString(path2, allowAboveRoot) {
531
533
  }
532
534
  } else {
533
535
  if (res.length > 0) {
534
- res += `/${path2.slice(lastSlash + 1, index)}`;
536
+ res += `/${path3.slice(lastSlash + 1, index)}`;
535
537
  } else {
536
- res = path2.slice(lastSlash + 1, index);
538
+ res = path3.slice(lastSlash + 1, index);
537
539
  }
538
540
  lastSegmentLength = index - lastSlash - 1;
539
541
  }
@@ -614,8 +616,8 @@ var parse = function(p) {
614
616
  name: base.slice(0, base.length - extension.length)
615
617
  };
616
618
  };
617
- var matchesGlob = (path2, pattern) => {
618
- return zeptomatch(pattern, normalize(path2));
619
+ var matchesGlob = (path3, pattern) => {
620
+ return zeptomatch(pattern, normalize(path3));
619
621
  };
620
622
  var _path = {
621
623
  __proto__: null,
@@ -695,7 +697,7 @@ var postcssPlugin = "postcss-tailwindcss-injector";
695
697
 
696
698
  // src/wxml.ts
697
699
  init_esm_shims();
698
- import path from "node:path";
700
+ import path2 from "path";
699
701
  import fs from "fs-extra";
700
702
  import { Parser } from "htmlparser2";
701
703
  import MagicString from "magic-string";
@@ -760,7 +762,7 @@ function processWxml(wxml) {
760
762
  }
761
763
  async function getDep(filepath, set2) {
762
764
  if (await fs.exists(filepath)) {
763
- const dirname2 = path.dirname(filepath);
765
+ const dirname2 = path2.dirname(filepath);
764
766
  set2.add(filepath);
765
767
  const wxml = await fs.readFile(filepath, "utf8");
766
768
  const hash = md5(wxml);
@@ -776,7 +778,7 @@ async function getDep(filepath, set2) {
776
778
  deps = cacheDeps;
777
779
  }
778
780
  for (const { value } of deps) {
779
- const p = path.resolve(dirname2, value);
781
+ const p = path2.resolve(dirname2, value);
780
782
  if (!set2.has(p)) {
781
783
  await getDep(p, set2);
782
784
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tailwindcss-injector",
3
3
  "type": "module",
4
- "version": "1.0.2",
4
+ "version": "1.0.3-alpha.0",
5
5
  "description": "tsup(esbuild) build package template",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -34,9 +34,9 @@
34
34
  "fs-extra": "^11.3.0",
35
35
  "htmlparser2": "^10.0.0",
36
36
  "magic-string": "^0.30.17",
37
- "postcss": "^8.5.3",
37
+ "postcss": "^8.5.6",
38
38
  "tailwindcss": "^3.4.17",
39
- "@weapp-tailwindcss/shared": "1.0.2",
39
+ "@weapp-tailwindcss/shared": "1.0.3-alpha.0",
40
40
  "tailwindcss-config": "1.0.0"
41
41
  },
42
42
  "scripts": {