Skip to content

Commit

Permalink
feat: custom install support show log (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
caohuilin authored Sep 12, 2023
1 parent 47261b9 commit 80b23b0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
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

0 comments on commit 80b23b0

Please sign in to comment.