neo-cmp-cli 1.7.9 → 1.7.11
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
CHANGED
|
@@ -62,19 +62,22 @@ module.exports = function (projectPath, options = {}) {
|
|
|
62
62
|
|
|
63
63
|
// 输出 shell 命令让用户执行(这样可以真正改变 shell 的工作目录)
|
|
64
64
|
if (outputShellCommand) {
|
|
65
|
-
const command = `neo open -n ${projectName}`;
|
|
66
65
|
// 输出提示信息
|
|
67
66
|
console.log('\n' + '='.repeat(60));
|
|
68
|
-
console.log('💡
|
|
69
|
-
console.log(`\n
|
|
67
|
+
console.log('💡 提示:要切换到新建项目目录,请执行以下命令:');
|
|
68
|
+
console.log(`\n cd ${projectName} \n`);
|
|
70
69
|
console.log('='.repeat(60));
|
|
71
|
-
console.log('\n📝
|
|
72
|
-
console.log(` 您需要手动执行上述命令才能进入刚创建的自定义组件项目(${projectName}
|
|
70
|
+
console.log('\n📝 说明1:组件开发工具(neo-cmp-cli)无法直接改变当前命令窗口工作目录,');
|
|
71
|
+
console.log(` 您需要手动执行上述命令才能进入刚创建的自定义组件项目(${projectName})。`);
|
|
72
|
+
console.log(
|
|
73
|
+
`\n📝 说明2:组件开发工具(neo-cmp-cli)默认自动打开编辑器(cursor 或 vscode): neo open -n ${projectName}。\n`
|
|
74
|
+
);
|
|
73
75
|
|
|
74
76
|
// 自动打开 IDE编辑器(异步执行,不需要等待)
|
|
75
|
-
openProject('auto',
|
|
77
|
+
openProject('auto', projectPath).catch((error) => {
|
|
76
78
|
// 错误已在 openProject 内部处理,这里只是防止未处理的 Promise 警告
|
|
77
|
-
console.error(
|
|
79
|
+
console.error(`自动打开编辑器出错(neo open -n ${projectName}): ${error.message}`);
|
|
80
|
+
console.error(`请手动执行命令 neo open -n ${projectName} 打开编辑器。`);
|
|
78
81
|
});
|
|
79
82
|
}
|
|
80
83
|
|
|
@@ -10,7 +10,7 @@ const { errorLog } = require('../common');
|
|
|
10
10
|
*/
|
|
11
11
|
module.exports = async function (editorType, targetPath) {
|
|
12
12
|
const targetDir = targetPath ? path.resolve(targetPath) : process.cwd();
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
// 检查目录是否存在
|
|
15
15
|
if (!fs.existsSync(targetDir)) {
|
|
16
16
|
errorLog(`目录不存在: ${targetDir}`);
|
|
@@ -37,20 +37,14 @@ module.exports = async function (editorType, targetPath) {
|
|
|
37
37
|
editorName = 'Cursor';
|
|
38
38
|
// macOS 可以使用应用名称或命令名称
|
|
39
39
|
if (isMac) {
|
|
40
|
-
editorConfigs = [
|
|
41
|
-
{ app: { name: 'cursor' } },
|
|
42
|
-
{ app: { name: 'Cursor' } }
|
|
43
|
-
];
|
|
40
|
+
editorConfigs = [{ app: { name: 'cursor' } }, { app: { name: 'Cursor' } }];
|
|
44
41
|
} else if (isWindows || isLinux) {
|
|
45
42
|
editorConfigs = [{ app: { name: 'cursor' } }];
|
|
46
43
|
}
|
|
47
44
|
} else if (editorType === 'vscode' || editorType === 'code') {
|
|
48
45
|
editorName = 'Visual Studio Code';
|
|
49
46
|
if (isMac) {
|
|
50
|
-
editorConfigs = [
|
|
51
|
-
{ app: { name: 'code' } },
|
|
52
|
-
{ app: { name: 'Visual Studio Code' } }
|
|
53
|
-
];
|
|
47
|
+
editorConfigs = [{ app: { name: 'code' } }, { app: { name: 'Visual Studio Code' } }];
|
|
54
48
|
} else if (isWindows || isLinux) {
|
|
55
49
|
editorConfigs = [{ app: { name: 'code' } }];
|
|
56
50
|
}
|
|
@@ -64,10 +58,7 @@ module.exports = async function (editorType, targetPath) {
|
|
|
64
58
|
{ app: { name: 'Visual Studio Code' } }
|
|
65
59
|
];
|
|
66
60
|
} else if (isWindows || isLinux) {
|
|
67
|
-
editorConfigs = [
|
|
68
|
-
{ app: { name: 'cursor' } },
|
|
69
|
-
{ app: { name: 'code' } }
|
|
70
|
-
];
|
|
61
|
+
editorConfigs = [{ app: { name: 'cursor' } }, { app: { name: 'code' } }];
|
|
71
62
|
}
|
|
72
63
|
}
|
|
73
64
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { execSync } = require('child_process');
|
|
2
2
|
|
|
3
3
|
// 所有需要废弃的版本(1.6.2 之前的所有版本)
|
|
4
|
-
const versionsToDeprecate = ["1.7.5", "1.7.5-beta.1", "1.7.5-beta.2", "1.7.6", "1.7.7", "1.7.8"];
|
|
4
|
+
const versionsToDeprecate = ["1.7.5", "1.7.5-beta.1", "1.7.5-beta.2", "1.7.6", "1.7.7", "1.7.8", "1.7.9", "1.7.10"];
|
|
5
5
|
|
|
6
6
|
const packageName = 'neo-cmp-cli';
|
|
7
7
|
const deprecateMessage = '此版本为开发中版本(存在 bug),请升级到最新版本。';
|