-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance start and build scripts to add support for Windows developers (…
…#203) * Enhance start and build scripts to add support for Windows developers * - Further updates on README.md - Remove the text about Windows being unsupported - Updated the local port from 5173 to 443 - Added more instruction how to set up a dev env --------- Co-authored-by: chengkeith <[email protected]>
- Loading branch information
1 parent
a41fb00
commit 942c1ee
Showing
7 changed files
with
83 additions
and
11 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
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
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,12 @@ | ||
:<<"::WINDOWS_BATCH" | ||
:; ##### BEGIN Windows Batch Script ##### | ||
@echo off | ||
call ./scripts/prebuild-win.cmd && tsc && vite build | ||
:; ##### END Windows Batch Script ##### | ||
GOTO :END_OF_SCRIPT | ||
::WINDOWS_BATCH | ||
|
||
# ##### BEGIN Unix Shell Script ##### | ||
. ./scripts/prebuild.sh; tsc && vite build | ||
# ##### END Unix Shell Script ##### | ||
#:END_OF_SCRIPT |
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 @@ | ||
if "%VITE_COMMIT_HASH%"== "" ( | ||
for /f "delims=" %%a in ('git rev-parse --short HEAD') do ( | ||
set VITE_COMMIT_HASH=%%a | ||
) | ||
) | ||
|
||
if "%VITE_COMMIT_MESSAGE%"== "" ( | ||
for /f "delims=" %%a in ('git log -1 --pretty^=format:%%s') do ( | ||
set VITE_COMMIT_MESSAGE=%%a | ||
) | ||
) | ||
|
||
if "%VITE_VERSION%"== "" ( | ||
for /f "usebackq delims=s" %%a in (`powershell -Command "Write-Host $(node -e 'console.log(require(''./package.json'').version)')"`) do ( | ||
set VITE_VERSION=%%a | ||
) | ||
) | ||
|
||
if "%VITE_REPO_URL%"== "" ( | ||
for /f "delims=" %%a in ('git config --get remote.origin.url') do ( | ||
set VITE_REPO_URL=%%a | ||
) | ||
) | ||
|
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,12 @@ | ||
:<<"::WINDOWS_BATCH" | ||
:; ##### BEGIN Windows Batch Script ##### | ||
@echo off | ||
call ./scripts/prebuild-win.cmd && vite --force | ||
:; ##### END Windows Batch Script ##### | ||
GOTO :END_OF_SCRIPT | ||
::WINDOWS_BATCH | ||
|
||
# ##### BEGIN Unix Shell Script ##### | ||
. ./scripts/prebuild.sh; vite --force | ||
# ##### END Unix Shell Script ##### | ||
#:END_OF_SCRIPT |