public
Created

azu さんのespowerun.jsをキックするwindows用シェルスクリプト c.f. https://gist.github.com/azu/6309397

  • Download Gist
espowerun.cmd
Batchfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
@echo off
 
if "%1"=="" (
echo "Usage: ./espowerun.cmd path/to/test.js"
exit
)
 
set tmpname=
set tmpdir=
FOR /L %%i IN (0 1 100) DO (
if not exist tmp%%i (
set tmpname=%%i
set tmpdir=tmp%%i
goto found
)
)
:found
mkdir %tmpdir%
 
node %~dp0\espowerun.js "%1" > %tmpdir%\%tmpname%.js
node /path/to/mocha/bin/mocha %tmpdir%
 
del /F /Q %tmpdir%
rmdir %tmpdir%

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.