Skip to content

Instantly share code, notes, and snippets.

@kellyselden
Last active October 17, 2015 19:49
Show Gist options
  • Save kellyselden/40ae3fcf4680453994e3 to your computer and use it in GitHub Desktop.
Save kellyselden/40ae3fcf4680453994e3 to your computer and use it in GitHub Desktop.
reruns all the generators for your project, overwriting everything
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