Last active
August 29, 2015 14:08
-
-
Save chrahunt/97b70777beb6ae1ebff4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@echo off | |
set extension_name=tagpro-bot-userscript | |
::Set these if juicer/uglify are not on your path. | |
set juicer_path=C:\Ruby193\bin\juicer.bat | |
set uglifyjs_path=%HOME%\AppData\Roaming\npm\uglifyjs.cmd | |
::Location of your project source files. | |
set project_src_path=.. | |
::Location of the installed UserScript within Chrome's extension | |
::directory, including the filename script.js. | |
set chrome_extension="%HOME%\AppData\Local\Google\Chrome\User Data\Default\Extensions\gefkobiiaofjblpeikhfacinlnmfnpgd\0.1_0\script.js" | |
::Shouldn't need to touch this. | |
set juicer_output_path="%project_src_path%\..\%extension_name%.user.js" | |
set juicer_input_path="%project_src_path%\build\make.js" | |
where juicer | |
if %ERRORLEVEL% neq 0 ( | |
set juicer=%juicer_path% | |
) ELSE ( | |
set juicer=juicer | |
) | |
where uglifyjs | |
if %ERRORLEVEL% neq 0 ( | |
set uglifyjs=%uglifyjs_path% | |
) ELSE ( | |
set uglifyjs=uglifyjs | |
) | |
::Replace backslashes with slash. | |
set juicer_output_path=%juicer_output_path:\=/% | |
set juicer_input_path=%juicer_input_path:\=/% | |
set chrome_extension=%chrome_extension:\=/% | |
@echo on | |
::Run commands. | |
call %juicer% merge --force --ignore-problems -o %juicer_output_path% %juicer_input_path% | |
call %uglifyjs% %juicer_output_path% --comments all --screw-ie8 true -o %chrome_extension% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment