Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: custom install support show log #121

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/silent-weeks-wash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@modern-js/codesmith-api-app': patch
---

feat: custom install support show log

feat: 自定义安装命令支持展示日志信息
9 changes: 7 additions & 2 deletions packages/api/app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@ export class AppAPI {
}
let intallPromise;
if (command) {
intallPromise = execa(command, [], { shell: true });
intallPromise = execa(command, [], {
shell: true,
stdin: 'inherit',
stdout: 'inherit',
stderr: 'inherit',
...(options || {}),
});
} else if (packageManager === 'pnpm') {
intallPromise = this.npmApi.pnpmInstall({ ...(options || {}), useNvm });
} else if (packageManager === 'yarn') {
Expand Down Expand Up @@ -327,7 +333,6 @@ export class AppAPI {
configValue: Record<string, unknown> = {},
validateMap: Record<
string,
// eslint-disable-next-line max-lines
(
input: unknown,
data?: Record<string, unknown>,
Expand Down
Loading