-
Notifications
You must be signed in to change notification settings - Fork 859
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
104 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
/**/node_modules/ | ||
/**/*.sln.ide/ | ||
/TestResults/ | ||
/TestTools/ | ||
/.vs/ | ||
.NuGet/ | ||
artifacts/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,4 @@ | ||
@ECHO OFF | ||
PUSHD %~dp0 | ||
|
||
SETLOCAL | ||
SETLOCAL ENABLEDELAYEDEXPANSION | ||
|
||
:: Check if node exists globally | ||
WHERE node >NUL | ||
IF NOT '%ERRORLEVEL%'=='0' ( | ||
ECHO ERROR: UpdateTemplate.cmd requires node installed globally. | ||
GOTO :Exit | ||
) | ||
|
||
SET TemplateHome=%~dp0src\docfx.website.themes\ | ||
SET DefaultTemplate=%TemplateHome%default\ | ||
SET GulpCommand=%DefaultTemplate%node_modules\gulp\bin\gulp | ||
|
||
CD %DefaultTemplate% | ||
CALL npm install | ||
CALL node .\node_modules\bower\bin\bower install | ||
CALL node %GulpCommand% | ||
|
||
CD %TemplateHome% | ||
CALL npm install | ||
CALL node %GulpCommand% | ||
|
||
:Exit | ||
PowerShell -NoProfile -ExecutionPolicy Bypass -Command ".\UpdateTemplate.ps1 %*; exit $LastExitCode;" | ||
POPD | ||
|
||
EXIT /B %ERRORLEVEL%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
$ErrorActionPreference = "Stop" | ||
|
||
# Check if node exists globally | ||
if (-not (Get-Command "node" -ErrorAction SilentlyContinue)) { | ||
Write-Host "ERROR: UpdateTemplate.sh requires node installed globally." | ||
exit 1 | ||
} | ||
|
||
Push-Location $PSScriptRoot | ||
|
||
$TemplateHome="$PSScriptRoot/src/docfx.website.themes/" | ||
$DefaultTemplate="${TemplateHome}default/" | ||
$GulpCommand="${DefaultTemplate}node_modules/gulp/bin/gulp" | ||
|
||
Set-Location "$DefaultTemplate" | ||
npm install | ||
node ./node_modules/bower/bin/bower install | ||
node "$GulpCommand" | ||
|
||
Set-Location "$TemplateHome" | ||
npm install | ||
node "$GulpCommand" | ||
|
||
Pop-Location |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
pushd "$(dirname "${BASH_SOURCE[0]}")" | ||
pwsh -NoProfile -ExecutionPolicy Bypass -Command "./UpdateTemplate.ps1 $@; exit $LastExitCode;" | ||
popd | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
pushd "$(dirname "${BASH_SOURCE[0]}")" | ||
pwsh -NoProfile -ExecutionPolicy Bypass -Command "./build.ps1 $@; exit $LastExitCode;" | ||
popd | ||
|