Commit 733c925a 733c925abed8edf388c4d505d95d279edb7d2153 by Reina Sweet Committed by Nicolas Perriault

A windows specific loader for casperjs

1 parent b4330f53
1 @ECHO OFF
2 set CASPER_BIN=%~dp0
3 set CASPER_PATH=%~dp0..\
4
5 set PHANTOMJS_NATIVE_ARGS=(--cookies-file --config --debug --disk-cache --ignore-ssl-errors --load-images --load-plugins --local-storage-path --local-storage-quota --local-to-remote-url-access --max-disk-cache-size --output-encoding --proxy --proxy-auth --proxy-type --remote-debugger-port --remote-debugger-autorun --script-encoding --web-security)
6
7 set PHANTOM_ARGS=
8 set CASPER_ARGS=
9
10 :Loop
11 if "%1"=="" goto Continue
12 set IS_PHANTOM_ARG=0
13 for %%i in %PHANTOMJS_NATIVE_ARGS% do (
14 if "%%i"=="%1" set IS_PHANTOM_ARG=1
15 )
16 if %IS_PHANTOM_ARG%==0 set CASPER_ARGS=%CASPER_ARGS% %1
17 if %IS_PHANTOM_ARG%==1 set PHANTOM_ARGS=%PHANTOM_ARGS% %1
18 shift
19 goto Loop
20 :Continue
21
22 call phantomjs%PHANTOM_ARGS% %CASPER_BIN%bootstrap.js --casper-path=%CASPER_PATH% --cli%CASPER_ARGS%
...\ No newline at end of file ...\ No newline at end of file