Files
OurUmbraco/build/BuildClientFiles.bat
T

43 lines
1.2 KiB
Batchfile
Raw Normal View History

@ECHO OFF
SETLOCAL
:: SETLOCAL is on, so changes to the path not persist to the actual user's path
2016-12-07 17:45:57 +01:00
SET release=%1
SET buildFolder=%CD%
SET nuGetFolder=%CD%\..\packages
ECHO Configured packages folder: %nuGetFolder%
ECHO Current folder: %CD%
2016-12-07 17:45:57 +01:00
ECHO Installing Npm NuGet Package
"%CD%\..\.nuget\NuGet.exe" install Npm.js -OutputDirectory "%nuGetFolder%" -Verbosity quiet
2016-12-07 17:45:57 +01:00
for /f "delims=" %%A in ('dir "%nuGetFolder%\node.js.*" /b') do set "nodePath=%nuGetFolder%\%%A\"
for /f "delims=" %%A in ('dir "%nuGetFolder%\npm.js.*" /b') do set "npmPath=%nuGetFolder%\%%A\tools\"
REM Ensures that we look for the just downloaded NPM, not whatever the user has installed on their machine
2016-12-07 17:45:57 +01:00
SET PATH=%npmPath%;%nodePath%;%PATH%
ECHO Path
ECHO %PATH%
2016-12-07 17:45:57 +01:00
ECHO Node
node -v
2016-12-07 17:45:57 +01:00
ECHO Change directory to "%CD%\..\OurUmbraco.Client"
CD "%CD%\..\OurUmbraco.Client"
ECHO.
ECHO Setting node_modules folder to hidden to prevent VS13 from crashing on it while loading the websites project
attrib +h node_modules
2016-12-07 17:45:57 +01:00
ECHO Npm Cache Clean
2015-12-18 12:12:28 +01:00
call npm cache clean
2016-12-07 17:45:57 +01:00
ECHO Npm Install
call npm install
2016-12-07 17:45:57 +01:00
ECHO Npm Install Gulp
call npm install -g install gulp -g --quiet
2016-12-07 17:45:57 +01:00
ECHO Gulp build
call gulp build
ECHO Move back to the build folder
CD %buildFolder%