From e2541a18838216ca05900e8c5b9c8c9705e7701e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 13 Aug 2020 12:41:59 +0300 Subject: Run Yarn with npx --- build.gradle | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 929c2353..5aa2f2e2 100644 --- a/build.gradle +++ b/build.gradle @@ -48,9 +48,9 @@ task yarn(type: Exec) { inputs.file('yarn.lock') outputs.file('yarn.lock') if (DefaultNativePlatform.getCurrentOperatingSystem().isWindows()) { - commandLine 'cmd', '/c', 'yarn' + commandLine 'cmd', '/c', 'npx', 'yarn' } else { - commandLine 'yarn' + commandLine 'npx', 'yarn' } } @@ -60,9 +60,9 @@ task yarnCompile(type: Exec) { inputs.file('webpack.config.js') outputs.dir('src/main/resources/static') if (DefaultNativePlatform.getCurrentOperatingSystem().isWindows()) { - commandLine 'cmd', '/c', 'yarn', 'compile' + commandLine 'cmd', '/c', 'npx', 'yarn', 'compile' } else { - commandLine 'yarn', 'compile' + commandLine 'npx', 'yarn', 'compile' } } -- cgit v1.2.3