2019-03-28 21:16:44 -04:00
|
|
|
# Node.js
|
|
|
|
# Build a general Node.js project with npm.
|
|
|
|
# Add steps that analyze code, save build artifacts, deploy, and more:
|
|
|
|
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
|
|
|
|
|
|
|
|
trigger:
|
2019-03-28 22:20:29 -04:00
|
|
|
branches:
|
2019-03-28 22:25:10 -04:00
|
|
|
include:
|
|
|
|
- '*'
|
2019-03-28 22:20:29 -04:00
|
|
|
exclude:
|
|
|
|
- l10n_master
|
2019-03-28 21:16:44 -04:00
|
|
|
|
|
|
|
pool:
|
2019-03-28 22:20:29 -04:00
|
|
|
vmImage: 'vs2017-win2016'
|
|
|
|
|
2019-03-28 22:26:08 -04:00
|
|
|
name: $(Rev:r)
|
2019-03-28 21:16:44 -04:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
|
|
|
inputs:
|
|
|
|
versionSpec: '10.x'
|
|
|
|
displayName: 'Install Node.js'
|
|
|
|
|
2019-03-28 22:20:29 -04:00
|
|
|
- powershell: |
|
|
|
|
choco install cloc --no-progress
|
|
|
|
cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git
|
2019-03-28 22:34:34 -04:00
|
|
|
displayName: 'Cloc'
|
2019-03-28 22:20:29 -04:00
|
|
|
|
2019-03-28 21:16:44 -04:00
|
|
|
- script: |
|
2019-03-28 22:20:29 -04:00
|
|
|
node --version
|
2020-01-20 07:50:13 -05:00
|
|
|
call npm --version
|
2019-03-28 22:34:34 -04:00
|
|
|
displayName: 'Version checks'
|
2019-03-28 22:20:29 -04:00
|
|
|
|
2020-01-20 07:50:13 -05:00
|
|
|
- script: call npm install
|
2019-03-28 22:34:34 -04:00
|
|
|
displayName: 'npm install'
|
2019-03-28 22:20:29 -04:00
|
|
|
|
2020-01-20 07:50:13 -05:00
|
|
|
- script: call npm run build
|
2019-03-28 22:34:34 -04:00
|
|
|
displayName: 'npm run build'
|