version: '{build}'
environment:
  NODE_VERSION: "4.2.2"
  NPM_USERNAME:
    secure: mHTyE5DVKgdc0uX8im15gw==
  NPM_PASSWORD:
    secure: FzxbhiwaBm3O1y9NehzsjQ==
  NPM_EMAIL:
    secure: TQ/aOq9ygzIOuyF3fh85dQ4Hr6HFL+PIRQnKFjra4KU=
install:
- ps: >-
    Install-Product node $env:NODE_VERSION
    
    & npm install -g npm
    
    $ErrorActionPreference = "SilentlyContinue"
    
    & npm install 2>&1
    
    trap { "Error: $_" }
    
    $LastExitCode = 0
    
    & npm --version
    
    exit 0
build:
  verbosity: minimal
test_script:
- cmd: npm test
deploy_script:
- cmd: >-
    if %APPVEYOR_REPO_BRANCH% neq master exit 
    
    node --version
    
    echo %NPM_USERNAME%> adduser.txt
    
    echo %NPM_PASSWORD%>> adduser.txt
    
    echo %NPM_EMAIL%>> adduser.txt
    
    echo >> adduser.txt
    
    type adduser.txt | npm adduser
    
    del adduser.txt
    
    npm publish

version: '{build}'
environment:
  NODE_VERSION: "4.2.2"
  NPM_USERNAME:
    secure: mHTyE5DVKgdc0uX8im15gw==
  NPM_PASSWORD:
    secure: FzxbhiwaBm3O1y9NehzsjQ==
  NPM_EMAIL:
    secure: TQ/aOq9ygzIOuyF3fh85dQ4Hr6HFL+PIRQnKFjra4KU=
install:
- ps: >-
    Install-Product node $env:NODE_VERSION
    
    & npm install -g npm
    
    $ErrorActionPreference = "SilentlyContinue"
    
    trap { "Error: $_" }
    
    $LastExitCode = 0
    
    & npm --version
    
    exit 0
build:
  verbosity: minimal
test_script:
- cmd: npm test
deploy_script:
- cmd: >-
    if %APPVEYOR_REPO_BRANCH% neq master exit 
    
    node --version
    
    echo %NPM_USERNAME%> adduser.txt
    
    echo %NPM_PASSWORD%>> adduser.txt
    
    echo %NPM_EMAIL%>> adduser.txt
    
    echo >> adduser.txt
    
    type adduser.txt | npm adduser
    
    del adduser.txt
    
    npm publish

Drop the npm install to see if it can be done successfully later in the build
Drop the npm install to see if it can be done successfully later in the build
