1 Star 0 Fork 1

prtemly/pxt-arcade

forked from 胡波/pxt-arcade 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
setup.cmd 2.45 KB
一键复制 编辑 原始数据 按行查看 历史
@if not defined _echo @echo off
setlocal enabledelayedexpansion
set BatchFile=%0
set Root=%~dp0
set arcadeRoot=%cd%
set TerminalPath=%LocalAppData%\Microsoft\WindowsApps\wt.exe
set cmdPath=cmd.exe
set OptPull=false
set OptLink=false
set OptRun=false
set OptFirst=false
:ParseArguments
if "%1" == "" goto :DoneParsing
if /I "%1" == "/?" call :Usage && exit /b 1
if /I "%1" == "/firsttime" set "OptFirst=true" && set "OptLink=true" && shift && goto :ParseArguments
if /I "%1" == "/pull" set "OptPull=true" && shift && goto :ParseArguments
if /I "%1" == "/link" set "OptLink=true" && shift && goto :ParseArguments
if /I "%1" == "/run" set "OptRun=true" && shift && goto :ParseArguments
call :Usage && exit /b 1
:DoneParsing
if "%OptFirst%" == "true" (
git clone https://github.com/microsoft/pxt-arcade
git clone https://github.com/microsoft/pxt
git clone https://github.com/microsoft/pxt-common-packages
call npm install -g pxt
call npm install -g gulp
cd pxt-arcade
set arcadeRoot=%cd%
echo done cloning
)
if "%OptPull%" == "true" (
echo pull pxt-arcade
git pull
pushd ..\pxt
echo pull pxt
git pull
popd
pushd ..\pxt-common-packages
echo pull pxt-common-packages
git pull
popd
)
if "%OptLink%" == "true" (
pushd ..\pxt
npm install
npm run build
popd
pushd ..\pxt-common-packages
npm install
npm link ../pxt
popd
npm install
npm link ../pxt
npm link ../pxt-common-packages
)
if "%OptRun%" == "true" (
start %cmdPath% /k "cd /d %arcadeRoot%\..\pxt && gulp watch"
pxt serve --rebundle
)
echo Completed
exit /b
:Usage
echo Usage: %BatchFile% [options]
echo.
echo Setup options:
echo /firsttime Sets up developer environment - will clone 3 repos (pxt, pxt-arcade, and pxt-common-packages) and then run /link option
echo /pull Does a git pull on 3 repos (pxt, pxt-arcade, and pxt-common-packages)
echo /link Runs npm install and links the 3 repos
echo /run Runs local server and watches for changes
goto :eof
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/prtemly/pxt-arcade.git
git@gitee.com:prtemly/pxt-arcade.git
prtemly
pxt-arcade
pxt-arcade
master

搜索帮助