diff --git a/.ci/azure-pipelines-build.yml b/.ci/azure-pipelines-build.yml index 128fe5460..05196d9d5 100644 --- a/.ci/azure-pipelines-build.yml +++ b/.ci/azure-pipelines-build.yml @@ -21,15 +21,15 @@ jobs: versionSpec: '12.x' - task: Cache@2 - displayName: 'Check Cache' + displayName: 'Cache node_modules' inputs: key: 'yarn | yarn.lock' path: 'node_modules' - cacheHitVar: CACHE_RESTORED - script: 'yarn install --frozen-lockfile' displayName: 'Install Dependencies' - condition: ne(variables.CACHE_RESTORED, 'true') + env: + SKIP_PREPARE: 'true' - script: 'yarn build:development' displayName: 'Build Development' diff --git a/.ci/azure-pipelines-lint.yml b/.ci/azure-pipelines-lint.yml index 1e4bddbd0..8d9efbd73 100644 --- a/.ci/azure-pipelines-lint.yml +++ b/.ci/azure-pipelines-lint.yml @@ -12,15 +12,15 @@ jobs: versionSpec: '12.x' - task: Cache@2 - displayName: 'Check Cache' + displayName: 'Cache node_modules' inputs: key: 'yarn | yarn.lock' path: 'node_modules' - cacheHitVar: CACHE_RESTORED - script: 'yarn install --frozen-lockfile' displayName: 'Install Dependencies' - condition: ne(variables.CACHE_RESTORED, 'true') + env: + SKIP_PREPARE: 'true' - script: 'yarn run lint --quiet' displayName: 'Run ESLint' diff --git a/package.json b/package.json index 45d1a83fe..8ec204d98 100644 --- a/package.json +++ b/package.json @@ -394,7 +394,7 @@ "scripts": { "start": "yarn serve", "serve": "gulp serve --development", - "prepare": "gulp --production", + "prepare": "./scripts/prepare.sh", "build:development": "gulp --development", "build:production": "gulp --production", "build:standalone": "gulp standalone --development", diff --git a/scripts/prepare.sh b/scripts/prepare.sh new file mode 100755 index 000000000..762674636 --- /dev/null +++ b/scripts/prepare.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +if [ -z "${SKIP_PREPARE}" ]; then + npx gulp --production +fi