@maiyunnet/kebab 9.1.3 → 9.1.4

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/doc/kebab-rag.md CHANGED
@@ -1355,7 +1355,7 @@ index/variables/VER.md
1355
1355
 
1356
1356
  # Variable: VER
1357
1357
 
1358
- > `const` **VER**: `"9.1.3"` = `'9.1.3'`
1358
+ > `const` **VER**: `"9.1.4"` = `'9.1.4'`
1359
1359
 
1360
1360
  Defined in: [index.ts:10](https://github.com/maiyunnet/kebab/blob/master/index.ts#L10)
1361
1361
 
package/index.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * --- 本文件用来定义每个目录实体地址的常量 ---
6
6
  */
7
7
  /** --- 当前系统版本号 --- */
8
- export declare const VER = "9.1.3";
8
+ export declare const VER = "9.1.4";
9
9
  /** --- 框架根目录,以 / 结尾 --- */
10
10
  export declare const ROOT_PATH: string;
11
11
  /** --- 框架的 LIB,以 / 结尾 --- */
package/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * --- 本文件用来定义每个目录实体地址的常量 ---
7
7
  */
8
8
  /** --- 当前系统版本号 --- */
9
- export const VER = '9.1.3';
9
+ export const VER = '9.1.4';
10
10
  // --- 服务端用的路径 ---
11
11
  const imu = decodeURIComponent(import.meta.url).replace('file://', '').replace(/^\/(\w:)/, '$1');
12
12
  /** --- /xxx/xxx --- */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maiyunnet/kebab",
3
- "version": "9.1.3",
3
+ "version": "9.1.4",
4
4
  "description": "Simple, easy-to-use, and fully-featured Node.js framework that is ready-to-use out of the box.",
5
5
  "type": "module",
6
6
  "keywords": [
package/sys/cmd.js CHANGED
@@ -506,7 +506,10 @@ async function run() {
506
506
  const tmpCss = entry + '.__tw__.css';
507
507
  await lFs.putContent(tmpCss, `@import "tailwindcss";\n@source "./**/*.tsx";\n`);
508
508
  try {
509
- const twJs = fileURLToPath(new URL('../node_modules/@tailwindcss/cli/dist/index.mjs', import.meta.url));
509
+ // --- 优先从用户项目根目录查找,找不到则 fallback kebab 包自身目录(用于 kebab 开发模式)---
510
+ const twJsUser = kebab.ROOT_CWD + 'node_modules/@tailwindcss/cli/dist/index.mjs';
511
+ const twJsSelf = fileURLToPath(new URL('../node_modules/@tailwindcss/cli/dist/index.mjs', import.meta.url));
512
+ const twJs = await lFs.isFile(twJsUser) ? twJsUser : twJsSelf;
510
513
  await new Promise((resolve, reject) => {
511
514
  const proc = childProcess.spawn(process.execPath, [twJs, '-i', tmpCss, '-o', cssOut, '--minify'], { 'shell': false });
512
515
  const errLines = [];