@weapp-tailwindcss/init 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/index.cjs +3 -6
- package/dist/index.d.ts +1 -6
- package/dist/index.js +2 -4
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// \0rolldown/runtime.js
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -20,7 +20,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
20
20
|
value: mod,
|
|
21
21
|
enumerable: true
|
|
22
22
|
}) : target, mod));
|
|
23
|
-
//#endregion
|
|
24
23
|
let node_process = require("node:process");
|
|
25
24
|
node_process = __toESM(node_process, 1);
|
|
26
25
|
let _weapp_tailwindcss_logger = require("@weapp-tailwindcss/logger");
|
|
@@ -31,7 +30,7 @@ let pathe = require("pathe");
|
|
|
31
30
|
pathe = __toESM(pathe, 1);
|
|
32
31
|
let semver = require("semver");
|
|
33
32
|
semver = __toESM(semver, 1);
|
|
34
|
-
|
|
33
|
+
// src/npm.ts
|
|
35
34
|
/**
|
|
36
35
|
* @example 'https://registry.npmjs.org'
|
|
37
36
|
* @example 'https://registry.npmmirror.com'
|
|
@@ -66,8 +65,7 @@ async function getDevDepsVersions(options, mode = "v4") {
|
|
|
66
65
|
return [x[0], `^${await getLatestVersionInRange(...x, options)}`];
|
|
67
66
|
})));
|
|
68
67
|
}
|
|
69
|
-
|
|
70
|
-
//#region src/index.ts
|
|
68
|
+
// src/index.ts
|
|
71
69
|
async function createContext(options) {
|
|
72
70
|
const { cwd, pkgJsonBasename, postcssConfigBasename, tailwindConfigBasename, cssEntryBasename, sourceGlob, mode, fetchOptions } = options;
|
|
73
71
|
const pkgJsonPath = pathe.default.resolve(cwd, pkgJsonBasename);
|
|
@@ -158,7 +156,6 @@ async function init(options) {
|
|
|
158
156
|
_weapp_tailwindcss_logger.logger.success("`weapp-tailwindcss` v5 初始化完成!请将 WeappTailwindcss() 注册到项目构建器,并确认入口 CSS 被实际引入。");
|
|
159
157
|
}
|
|
160
158
|
}
|
|
161
|
-
//#endregion
|
|
162
159
|
exports.createContext = createContext;
|
|
163
160
|
exports.getInitDefaults = getInitDefaults;
|
|
164
161
|
exports.init = init;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Options } from "npm-registry-fetch";
|
|
2
|
-
//#region ../../node_modules/.pnpm/pkg-types@2.3.3/node_modules/pkg-types/dist/index.d.mts
|
|
3
2
|
interface PackageJson {
|
|
4
3
|
/**
|
|
5
4
|
* The name is what your thing is called.
|
|
@@ -294,12 +293,8 @@ type PackageJsonFunding = string | {
|
|
|
294
293
|
type PackageJsonExportKey = "." | "import" | "require" | "types" | "node" | "browser" | "default" | (string & {});
|
|
295
294
|
type PackageJsonExportsObject = { [P in PackageJsonExportKey]?: string | PackageJsonExportsObject | Array<string | PackageJsonExportsObject>; };
|
|
296
295
|
type PackageJsonExports = string | PackageJsonExportsObject | Array<string | PackageJsonExportsObject>;
|
|
297
|
-
//#endregion
|
|
298
|
-
//#region src/npm.d.ts
|
|
299
296
|
type FetchOptions = Options;
|
|
300
297
|
type InitMode = 'v4' | 'legacy';
|
|
301
|
-
//#endregion
|
|
302
|
-
//#region src/index.d.ts
|
|
303
298
|
export interface CreateContextOptions {
|
|
304
299
|
cwd: string;
|
|
305
300
|
pkgJsonBasename?: string;
|
|
@@ -345,4 +340,4 @@ export declare function getInitDefaults(): {
|
|
|
345
340
|
mode: InitMode;
|
|
346
341
|
};
|
|
347
342
|
export declare function init(options?: CreateContextOptions): Promise<void>;
|
|
348
|
-
|
|
343
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { defu, setValue } from "@weapp-tailwindcss/shared";
|
|
|
4
4
|
import fs from "fs-extra";
|
|
5
5
|
import path from "pathe";
|
|
6
6
|
import semver from "semver";
|
|
7
|
-
|
|
7
|
+
// src/npm.ts
|
|
8
8
|
/**
|
|
9
9
|
* @example 'https://registry.npmjs.org'
|
|
10
10
|
* @example 'https://registry.npmmirror.com'
|
|
@@ -39,8 +39,7 @@ async function getDevDepsVersions(options, mode = "v4") {
|
|
|
39
39
|
return [x[0], `^${await getLatestVersionInRange(...x, options)}`];
|
|
40
40
|
})));
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
//#region src/index.ts
|
|
42
|
+
// src/index.ts
|
|
44
43
|
async function createContext(options) {
|
|
45
44
|
const { cwd, pkgJsonBasename, postcssConfigBasename, tailwindConfigBasename, cssEntryBasename, sourceGlob, mode, fetchOptions } = options;
|
|
46
45
|
const pkgJsonPath = path.resolve(cwd, pkgJsonBasename);
|
|
@@ -131,5 +130,4 @@ async function init(options) {
|
|
|
131
130
|
logger.success("`weapp-tailwindcss` v5 初始化完成!请将 WeappTailwindcss() 注册到项目构建器,并确认入口 CSS 被实际引入。");
|
|
132
131
|
}
|
|
133
132
|
}
|
|
134
|
-
//#endregion
|
|
135
133
|
export { createContext, getInitDefaults, init, touchCssEntry, touchPostcssConfig, touchTailwindConfig, updatePackageJson };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-tailwindcss/init",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.3",
|
|
5
5
|
"description": "Project initializer for cross-platform Tailwind CSS with weapp-tailwindcss. 用于初始化跨端 Tailwind CSS 项目的 weapp-tailwindcss 工具。",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"fs-extra": "^11.4.1",
|
|
39
39
|
"npm-registry-fetch": "^20.0.1",
|
|
40
40
|
"pathe": "^2.0.3",
|
|
41
|
-
"semver": "~7.8.
|
|
41
|
+
"semver": "~7.8.6"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"dev": "tsdown --watch --sourcemap",
|