I'm trying to cache my node_modules to improve the build performance.
This is the yaml:
pool:
vmImage: 'windows-latest'
variables:
ngWorkingDir: 'src\XXX\client'
npm_config_cache: $(Pipeline.Workspace)/.npm
CacheRestored: False
steps:
- task: Cache@2
inputs:
key: 'npm | "$(Agent.OS)" | $(ngWorkingDir)/package-lock.json'
restoreKeys: |
npm | "$(Agent.OS)"
path: '$(npm_config_cache)'
cacheHitVar: CacheRestored
displayName: Cache npm
- task: Npm@1
displayName: 'install node modules'
inputs:
workingDir: '$(ngWorkingDir)'
verbose: false
condition: eq(variables['CacheRestored'], False)
- task: Npm@1
displayName: ng lint
inputs:
command: 'custom'
workingDir: '$(ngWorkingDir)'
verbose: false
customCommand: 'run lint'
I'm not able to get the ng lint command working. I tried to install the angular cli globally as first step. But this also doesn't help.
