diff --git a/scripts/task.ts b/scripts/task.ts index 5733ca889493..b158614c2ee6 100644 --- a/scripts/task.ts +++ b/scripts/task.ts @@ -159,6 +159,11 @@ export const options = createOptions({ description: "Don't execute commands, just list them (dry run)?", promptType: false, }, + skipCache: { + type: 'boolean', + description: 'Skip NX remote cache?', + promptType: false, + }, debug: { type: 'boolean', description: 'Print all the logs to the console', diff --git a/scripts/tasks/compile.ts b/scripts/tasks/compile.ts index dc8bfb7f3f6c..3ae9e69aae16 100644 --- a/scripts/tasks/compile.ts +++ b/scripts/tasks/compile.ts @@ -37,9 +37,10 @@ export const compile: Task = { return false; } }, - async run({ codeDir }, { link, dryRun, debug, prod }) { + async run({ codeDir }, { link, dryRun, debug, prod, skipCache }) { + const command = link && !prod ? linkCommand : noLinkCommand; return exec( - link && !prod ? linkCommand : noLinkCommand, + `${command} ${skipCache ? '--skip-nx-cache' : ''}`, { cwd: codeDir }, { startMessage: '🥾 Bootstrapping',