-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
Install-NodeLts.ps1
38 lines (28 loc) · 1.08 KB
/
Install-NodeLts.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
################################################################################
## File: Install-NodeLts.ps1
## Desc: Install nodejs-lts and other common node tools.
## Must run after python is configured
################################################################################
Import-Module -Name ImageHelpers -Force
$PrefixPath = 'C:\npm\prefix'
$CachePath = 'C:\npm\cache'
New-Item -Path $PrefixPath -Force -ItemType Directory
New-Item -Path $CachePath -Force -ItemType Directory
Choco-Install -PackageName nodejs-lts -ArgumentList "--force"
Add-MachinePathItem $PrefixPath
$env:Path = Get-MachinePath
setx NPM_CONFIG_PREFIX $PrefixPath /M
$env:NPM_CONFIG_PREFIX = $PrefixPath
setx NPM_CONFIG_CACHE $CachePath /M
$env:NPM_CONFIG_CACHE = $CachePath
npm config set registry http://registry.npmjs.org/
npm install -g cordova
npm install -g grunt-cli
npm install -g gulp-cli
npm install -g parcel-bundler
npm install -g --save-dev webpack webpack-cli
npm install -g yarn
npm install -g lerna
npm install -g node-sass
npm install -g newman
Invoke-PesterTests -TestFile "Node"