feima-shortcuts 0.0.6 → 0.0.7
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/package.json +3 -2
- package/src/scripts/new.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "feima-shortcuts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "快捷指令",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"directories": {
|
|
@@ -21,5 +21,6 @@
|
|
|
21
21
|
"fs-extra": "^9.0.1",
|
|
22
22
|
"inquirer": "^7.3.0",
|
|
23
23
|
"uuid": "^9.0.0"
|
|
24
|
-
}
|
|
24
|
+
},
|
|
25
|
+
"packageManager": "pnpm@10.6.3+sha512.bb45e34d50a9a76e858a95837301bfb6bd6d35aea2c5d52094fa497a467c43f5c440103ce2511e9e0a2f89c3d6071baac3358fc68ac6fb75e2ceb3d2736065e6"
|
|
25
26
|
}
|
package/src/scripts/new.js
CHANGED
|
@@ -24,7 +24,7 @@ const fileData = (functionName, filePath) => {
|
|
|
24
24
|
}
|
|
25
25
|
return data;
|
|
26
26
|
}
|
|
27
|
-
return `import request from '@/utils/
|
|
27
|
+
return `import request from '@/utils/service'`;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
// 根据 URL 获取函数名(取最后一段)
|
|
@@ -64,7 +64,7 @@ exports.run = function ({ api }) {
|
|
|
64
64
|
const dir = getDirFromApi(api);
|
|
65
65
|
|
|
66
66
|
// 基于当前工作目录计算 API 路径
|
|
67
|
-
const pagePath = path.resolve(process.cwd(), `src/
|
|
67
|
+
const pagePath = path.resolve(process.cwd(), `src/service/${dir}`);
|
|
68
68
|
|
|
69
69
|
// 创建目录并生成 API 方法
|
|
70
70
|
makeDir(pagePath);
|