weapp-tailwindcss 5.0.0-next.35 → 5.0.0-next.37
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/index.js
CHANGED
|
@@ -3,7 +3,7 @@ const require_generator = require("./generator-BtpQoQEH.js");
|
|
|
3
3
|
const require_gulp = require("./gulp.js");
|
|
4
4
|
const require_postcss = require("./postcss-DSvNrY0J.js");
|
|
5
5
|
const require_vite = require("./vite-CMzi0wR2.js");
|
|
6
|
-
const require_webpack = require("./webpack-
|
|
6
|
+
const require_webpack = require("./webpack-DPF0Iabe.js");
|
|
7
7
|
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
8
8
|
exports.WeappTailwindcss = require_vite.WeappTailwindcss;
|
|
9
9
|
exports.createPlugins = require_gulp.createPlugins;
|
package/dist/index.mjs
CHANGED
|
@@ -2,6 +2,6 @@ import { t as createWeappTailwindcssGenerator } from "./generator-CmLpVJgw.mjs";
|
|
|
2
2
|
import { WeappTailwindcss as createPlugins } from "./gulp.mjs";
|
|
3
3
|
import { t as weappTailwindcssPostcssPlugin } from "./postcss-DGprmeke.mjs";
|
|
4
4
|
import { t as WeappTailwindcss } from "./vite-C8SUICPv.mjs";
|
|
5
|
-
import { n as weappTailwindcssPackageDir } from "./webpack-
|
|
5
|
+
import { n as weappTailwindcssPackageDir } from "./webpack-BQ43oxhq.mjs";
|
|
6
6
|
import { unitConversionComposeRules, unitConversionPresets } from "@weapp-tailwindcss/postcss";
|
|
7
7
|
export { WeappTailwindcss, createPlugins, createWeappTailwindcssGenerator, unitConversionComposeRules, unitConversionPresets, weappTailwindcssPackageDir, weappTailwindcssPostcssPlugin };
|
|
@@ -10,6 +10,7 @@ import fs from "node:fs";
|
|
|
10
10
|
import process from "node:process";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import { fileURLToPath } from "node:url";
|
|
13
|
+
import micromatch from "micromatch";
|
|
13
14
|
//#region src/shared/tailwindcss-css-redirect.ts
|
|
14
15
|
const moduleWithMutableResolve = Module;
|
|
15
16
|
const patched = /* @__PURE__ */ new WeakSet();
|
|
@@ -547,7 +548,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
547
548
|
});
|
|
548
549
|
}
|
|
549
550
|
//#endregion
|
|
550
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.1_oxc-resolver@11.
|
|
551
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.1_oxc-resolver@11.20.0_tsx@4.22.4_typescript@6.0.3_unrun@0.2.37_synckit@0.1_af1474666acd5eae3876d23fc3fbcf5c/node_modules/tsdown/esm-shims.js
|
|
551
552
|
const getFilename = () => fileURLToPath(import.meta.url);
|
|
552
553
|
const getDirname = () => path.dirname(getFilename());
|
|
553
554
|
const __dirname = /* @__PURE__ */ getDirname();
|
|
@@ -683,27 +684,56 @@ function setupWebpackV5Loaders(options) {
|
|
|
683
684
|
init_defineProperty();
|
|
684
685
|
const debug = createDebug();
|
|
685
686
|
const weappTailwindcssPackageDir = resolvePackageDir("weapp-tailwindcss");
|
|
687
|
+
const outputIgnoredPredicatePath = Symbol("weapp-tailwindcss.outputIgnoredPredicatePath");
|
|
686
688
|
function normalizeIgnoredList(ignored) {
|
|
687
|
-
if (Array.isArray(ignored)) return ignored;
|
|
688
|
-
|
|
689
|
+
if (Array.isArray(ignored)) return ignored.filter((item) => typeof item === "string" || item instanceof RegExp || typeof item === "function");
|
|
690
|
+
if (typeof ignored === "string" || ignored instanceof RegExp || typeof ignored === "function") return [ignored];
|
|
691
|
+
return [];
|
|
692
|
+
}
|
|
693
|
+
function createOutputIgnoredPredicate(ignoredList, ignoredPath) {
|
|
694
|
+
const predicate = (file) => {
|
|
695
|
+
const resolvedFile = path.resolve(file);
|
|
696
|
+
if (resolvedFile === ignoredPath || resolvedFile.startsWith(`${ignoredPath}${path.sep}`)) return true;
|
|
697
|
+
const normalizedFile = file.replace(/\\/g, "/");
|
|
698
|
+
return ignoredList.some((item) => {
|
|
699
|
+
if (typeof item === "string") {
|
|
700
|
+
const resolvedItem = path.resolve(item);
|
|
701
|
+
if (resolvedFile === resolvedItem || resolvedFile.startsWith(`${resolvedItem}${path.sep}`)) return true;
|
|
702
|
+
return micromatch.isMatch(normalizedFile, item);
|
|
703
|
+
}
|
|
704
|
+
if (item instanceof RegExp) return item.test(normalizedFile);
|
|
705
|
+
return item(file);
|
|
706
|
+
});
|
|
707
|
+
};
|
|
708
|
+
predicate[outputIgnoredPredicatePath] = ignoredPath;
|
|
709
|
+
return predicate;
|
|
689
710
|
}
|
|
690
711
|
function appendIgnoredPath(ignored, ignoredPath) {
|
|
712
|
+
if (typeof ignored === "function" && ignored[outputIgnoredPredicatePath] === ignoredPath) return ignored;
|
|
691
713
|
const ignoredList = normalizeIgnoredList(ignored);
|
|
714
|
+
if (ignoredList.some((item) => typeof item !== "string")) return createOutputIgnoredPredicate(ignoredList, ignoredPath);
|
|
692
715
|
if (ignoredList.some((item) => typeof item === "string" && path.resolve(item) === ignoredPath)) return ignored;
|
|
693
716
|
return [...ignoredList, ignoredPath];
|
|
694
717
|
}
|
|
695
718
|
function setupWebpackWatchOutputIgnore(compiler) {
|
|
696
|
-
const
|
|
697
|
-
if (typeof originalWatch !== "function") return;
|
|
698
|
-
compiler.watch = ((watchOptions, handler) => {
|
|
719
|
+
const appendOutputIgnoredPath = (watchOptions) => {
|
|
699
720
|
const outputPath = compiler.outputPath || compiler.options?.output?.path;
|
|
700
721
|
const outputDir = outputPath ? path.resolve(outputPath) : void 0;
|
|
701
|
-
if (!outputDir) return
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
}
|
|
706
|
-
|
|
722
|
+
if (!outputDir) return watchOptions;
|
|
723
|
+
if (watchOptions && typeof watchOptions === "object") {
|
|
724
|
+
watchOptions.ignored = appendIgnoredPath(watchOptions.ignored, outputDir);
|
|
725
|
+
return watchOptions;
|
|
726
|
+
}
|
|
727
|
+
return { ignored: appendIgnoredPath(void 0, outputDir) };
|
|
728
|
+
};
|
|
729
|
+
compiler.options.watchOptions = appendOutputIgnoredPath(compiler.options.watchOptions);
|
|
730
|
+
const syncOutputIgnoredPath = () => {
|
|
731
|
+
const outputPath = compiler.outputPath || compiler.options?.output?.path;
|
|
732
|
+
if (!(outputPath ? path.resolve(outputPath) : void 0)) return;
|
|
733
|
+
const watchOptions = compiler.watching?.watchOptions;
|
|
734
|
+
if (watchOptions) appendOutputIgnoredPath(watchOptions);
|
|
735
|
+
};
|
|
736
|
+
compiler.hooks.watchRun?.tap(pluginName, syncOutputIgnoredPath);
|
|
707
737
|
}
|
|
708
738
|
/**
|
|
709
739
|
* @name WeappTailwindcss
|
|
@@ -14,6 +14,8 @@ let node_process = require("node:process");
|
|
|
14
14
|
node_process = require_chunk.__toESM(node_process);
|
|
15
15
|
let node_path = require("node:path");
|
|
16
16
|
node_path = require_chunk.__toESM(node_path);
|
|
17
|
+
let micromatch = require("micromatch");
|
|
18
|
+
micromatch = require_chunk.__toESM(micromatch);
|
|
17
19
|
//#region src/shared/tailwindcss-css-redirect.ts
|
|
18
20
|
const moduleWithMutableResolve = node_module.default;
|
|
19
21
|
const patched = /* @__PURE__ */ new WeakSet();
|
|
@@ -682,27 +684,56 @@ function setupWebpackV5Loaders(options) {
|
|
|
682
684
|
require_precheck.init_defineProperty();
|
|
683
685
|
const debug = require_v3_engine.createDebug();
|
|
684
686
|
const weappTailwindcssPackageDir = require_bundle_state.resolvePackageDir("weapp-tailwindcss");
|
|
687
|
+
const outputIgnoredPredicatePath = Symbol("weapp-tailwindcss.outputIgnoredPredicatePath");
|
|
685
688
|
function normalizeIgnoredList(ignored) {
|
|
686
|
-
if (Array.isArray(ignored)) return ignored;
|
|
687
|
-
|
|
689
|
+
if (Array.isArray(ignored)) return ignored.filter((item) => typeof item === "string" || item instanceof RegExp || typeof item === "function");
|
|
690
|
+
if (typeof ignored === "string" || ignored instanceof RegExp || typeof ignored === "function") return [ignored];
|
|
691
|
+
return [];
|
|
692
|
+
}
|
|
693
|
+
function createOutputIgnoredPredicate(ignoredList, ignoredPath) {
|
|
694
|
+
const predicate = (file) => {
|
|
695
|
+
const resolvedFile = node_path.default.resolve(file);
|
|
696
|
+
if (resolvedFile === ignoredPath || resolvedFile.startsWith(`${ignoredPath}${node_path.default.sep}`)) return true;
|
|
697
|
+
const normalizedFile = file.replace(/\\/g, "/");
|
|
698
|
+
return ignoredList.some((item) => {
|
|
699
|
+
if (typeof item === "string") {
|
|
700
|
+
const resolvedItem = node_path.default.resolve(item);
|
|
701
|
+
if (resolvedFile === resolvedItem || resolvedFile.startsWith(`${resolvedItem}${node_path.default.sep}`)) return true;
|
|
702
|
+
return micromatch.default.isMatch(normalizedFile, item);
|
|
703
|
+
}
|
|
704
|
+
if (item instanceof RegExp) return item.test(normalizedFile);
|
|
705
|
+
return item(file);
|
|
706
|
+
});
|
|
707
|
+
};
|
|
708
|
+
predicate[outputIgnoredPredicatePath] = ignoredPath;
|
|
709
|
+
return predicate;
|
|
688
710
|
}
|
|
689
711
|
function appendIgnoredPath(ignored, ignoredPath) {
|
|
712
|
+
if (typeof ignored === "function" && ignored[outputIgnoredPredicatePath] === ignoredPath) return ignored;
|
|
690
713
|
const ignoredList = normalizeIgnoredList(ignored);
|
|
714
|
+
if (ignoredList.some((item) => typeof item !== "string")) return createOutputIgnoredPredicate(ignoredList, ignoredPath);
|
|
691
715
|
if (ignoredList.some((item) => typeof item === "string" && node_path.default.resolve(item) === ignoredPath)) return ignored;
|
|
692
716
|
return [...ignoredList, ignoredPath];
|
|
693
717
|
}
|
|
694
718
|
function setupWebpackWatchOutputIgnore(compiler) {
|
|
695
|
-
const
|
|
696
|
-
if (typeof originalWatch !== "function") return;
|
|
697
|
-
compiler.watch = ((watchOptions, handler) => {
|
|
719
|
+
const appendOutputIgnoredPath = (watchOptions) => {
|
|
698
720
|
const outputPath = compiler.outputPath || compiler.options?.output?.path;
|
|
699
721
|
const outputDir = outputPath ? node_path.default.resolve(outputPath) : void 0;
|
|
700
|
-
if (!outputDir) return
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
}
|
|
705
|
-
|
|
722
|
+
if (!outputDir) return watchOptions;
|
|
723
|
+
if (watchOptions && typeof watchOptions === "object") {
|
|
724
|
+
watchOptions.ignored = appendIgnoredPath(watchOptions.ignored, outputDir);
|
|
725
|
+
return watchOptions;
|
|
726
|
+
}
|
|
727
|
+
return { ignored: appendIgnoredPath(void 0, outputDir) };
|
|
728
|
+
};
|
|
729
|
+
compiler.options.watchOptions = appendOutputIgnoredPath(compiler.options.watchOptions);
|
|
730
|
+
const syncOutputIgnoredPath = () => {
|
|
731
|
+
const outputPath = compiler.outputPath || compiler.options?.output?.path;
|
|
732
|
+
if (!(outputPath ? node_path.default.resolve(outputPath) : void 0)) return;
|
|
733
|
+
const watchOptions = compiler.watching?.watchOptions;
|
|
734
|
+
if (watchOptions) appendOutputIgnoredPath(watchOptions);
|
|
735
|
+
};
|
|
736
|
+
compiler.hooks.watchRun?.tap(require_precheck.pluginName, syncOutputIgnoredPath);
|
|
706
737
|
}
|
|
707
738
|
/**
|
|
708
739
|
* @name WeappTailwindcss
|
package/dist/webpack.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_webpack = require("./webpack-
|
|
2
|
+
const require_webpack = require("./webpack-DPF0Iabe.js");
|
|
3
3
|
exports.WeappTailwindcss = require_webpack.WeappTailwindcss;
|
|
4
4
|
exports.weappTailwindcss = require_webpack.WeappTailwindcss;
|
|
5
5
|
exports.weappTailwindcssPackageDir = require_webpack.weappTailwindcssPackageDir;
|
package/dist/webpack.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as weappTailwindcssPackageDir, t as WeappTailwindcss } from "./webpack-
|
|
1
|
+
import { n as weappTailwindcssPackageDir, t as WeappTailwindcss } from "./webpack-BQ43oxhq.mjs";
|
|
2
2
|
export { WeappTailwindcss, WeappTailwindcss as weappTailwindcss, weappTailwindcssPackageDir };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-tailwindcss",
|
|
3
|
-
"version": "5.0.0-next.
|
|
3
|
+
"version": "5.0.0-next.37",
|
|
4
4
|
"description": "把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -185,9 +185,9 @@
|
|
|
185
185
|
"tailwindcss-patch": "9.4.1",
|
|
186
186
|
"yaml": "^2.9.0",
|
|
187
187
|
"@weapp-tailwindcss/logger": "2.0.0-next.0",
|
|
188
|
-
"@weapp-tailwindcss/shared": "2.0.0-next.1",
|
|
189
188
|
"tailwindcss-config": "2.0.0-next.3",
|
|
190
|
-
"@weapp-tailwindcss/postcss": "3.0.0-next.
|
|
189
|
+
"@weapp-tailwindcss/postcss": "3.0.0-next.10",
|
|
190
|
+
"@weapp-tailwindcss/shared": "2.0.0-next.1",
|
|
191
191
|
"@weapp-tailwindcss/reset": "0.1.1-next.1"
|
|
192
192
|
},
|
|
193
193
|
"devDependencies": {
|