Last active
October 17, 2015 19:49
-
-
Save kellyselden/40ae3fcf4680453994e3 to your computer and use it in GitHub Desktop.
reruns all the generators for your project, overwriting everything
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
if "%1"=="" goto :eof | |
setlocal enabledelayedexpansion | |
pushd %1\app | |
echo Set WshShell = Wscript.CreateObject("Wscript.Shell")>commands.vbs | |
echo WshShell.SendKeys "pushd %1{ENTER}">>commands.vbs | |
for /d %%d in (*) do ( | |
if not "%%d"=="instance-initializers" if not %%d==locales if not %%d==styles if not %%d==templates if not "%%d"=="torii-adapters" ( | |
pushd %%d | |
set folderName=%%d | |
set generator=!folderName:~0,-1! | |
for /r %%i in (*) do ( | |
set fullPath=%%i | |
set localPath=!fullPath:%CD%\%%d\=! | |
set file=!localPath:.js=! | |
if not !file!==.gitkeep ( | |
set command=ember g !generator! !file! | |
echo WshShell.SendKeys "!command!{ENTER}">>../commands.vbs | |
echo WshShell.SendKeys "{ENTER}">>../commands.vbs | |
echo WshShell.SendKeys "{ENTER}">>../commands.vbs | |
echo WshShell.SendKeys "{ENTER}">>../commands.vbs | |
) | |
) | |
popd | |
) | |
) | |
echo WshShell.SendKeys "popd{ENTER}">>commands.vbs | |
commands.vbs %1 | |
del commands.vbs | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment