-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add box\cuboid_with_square_section_a3 and _bat\*.*
- Loading branch information
Showing
37 changed files
with
872 additions
and
96 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
@ECHO OFF | ||
chcp 65001 | ||
:: %1: server, local, %2: min, %3: fileName, %4: subFolderName | ||
|
||
set langSet=en zh_cn zh_tw | ||
set landscapeSet=false true | ||
|
||
set htmFilename=%3% | ||
|
||
:: echo %4% | ||
set subFolderName= | ||
if "%4%" neq "" ( | ||
echo %%4%% is defined. | ||
set subFolderName=%4% | ||
) | ||
set subFolderName=%subFolderName:\=\\% | ||
:: echo subFolderName: %subFolderName% | ||
:: pause & exit | ||
|
||
if "%2%" == "min" ( | ||
set minSeg=.min | ||
) else ( | ||
set minSeg= | ||
) | ||
|
||
set htmlPath=%cd% | ||
call set htmlPath=%%htmlPath:_bat\box\%htmFilename%=%% | ||
:: echo %htmlPath% | ||
|
||
if "%1%" == "server" ( | ||
set url=https://anqisoft.github.io/ | ||
set goal=%CD%\server%minSeg%.json | ||
) else ( | ||
set url=file:///%htmlPath:\=/% | ||
set goal=%CD%\local%minSeg%.json | ||
) | ||
set url=%url%box/%htmFilename%%minSeg%.htm | ||
|
||
:: https://www.codenong.com/37071353/ | ||
if "%subFolderName%" neq "" ( | ||
set pdfPath=%htmlPath:\=\\%box\\%htmFilename%\\%subFolderName%\\pdfs\\ | ||
) else ( | ||
set pdfPath=%htmlPath:\=\\%box\\%htmFilename%\\pdfs\\ | ||
) | ||
set pdfPath=%pdfPath:\\\\=\\% | ||
:: echo %pdfPath% && pause | ||
:: echo %url% | ||
|
||
echo [>%goal% | ||
|
||
title "Create json config file for local" | ||
|
||
setlocal enabledelayedexpansion | ||
for %%l in (!langSet!) do ( | ||
set lang=%%l | ||
rem echo !lang! | ||
|
||
for /L %%n in (1, 1, 2) do ( | ||
set no=%%n | ||
rem echo !no! | ||
|
||
for %%d in (!landscapeSet!) do ( | ||
set landscape=%%d | ||
rem echo !lang! !no! !landscape! | ||
|
||
if "!landscape!" == "true" ( | ||
set pdfFile=landscape_!no! | ||
) else ( | ||
set pdfFile=portrait | ||
) | ||
rem echo !pdfFile! | ||
|
||
set ok=0 | ||
if "!landscape!" == "true" ( | ||
set ok=1 | ||
) else ( | ||
if "!no!" == "1" ( | ||
set ok=1 | ||
) | ||
) | ||
|
||
if "!ok!" == "1" ( | ||
set endChar=, | ||
if "!lang!:!no!:!landscape!" == "zh_tw:2:true" ( | ||
set endChar= | ||
) | ||
echo { "url": "!url!?lang=!lang!&landscape=!landscape!&no=!no!", "pdf": "!pdfPath!!lang!\\!pdfFile!.pdf", "params": { } }!endChar!>>%goal% | ||
) | ||
) | ||
) | ||
) | ||
|
||
echo ]>>%goal% | ||
:: PAUSE & exit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@ECHO OFF | ||
|
||
SET json=%cd%\%1% | ||
if "%2%" == "min" ( | ||
set json=%json%.min | ||
) | ||
SET json=%json%.json | ||
:: ECHO %json% | ||
|
||
title "%json%" | ||
:: setlocal enabledelayedexpansion | ||
|
||
SET PYTHONPATH=P:\anqi\Desktop\tech\python\projects\tools\dev\tools\ | ||
|
||
call %PYTHONPATH%venv\Scripts\activate.bat | ||
python %PYTHONPATH%main.py -F openUrlAndExportPdf -I %json% | ||
|
||
PAUSE |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@call ..\..\_common\run.core.bat local "" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@call ..\..\_common\run.core.bat local min |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@call ..\..\_common\run.core.bat server "" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@call ..\..\_common\run.core.bat server min |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
call ..\..\_common\createJson.core.bat local "" cuboid_with_square_section_a3 local |
1 change: 1 addition & 0 deletions
1
_bat/box/cuboid_with_square_section_a3/createJson.local.min.bat
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
call ..\..\_common\createJson.core.bat local min cuboid_with_square_section_a3 local.min |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
call ..\..\_common\createJson.core.bat server "" cuboid_with_square_section_a3 server |
1 change: 1 addition & 0 deletions
1
_bat/box/cuboid_with_square_section_a3/createJson.server.min.bat
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
call ..\..\_common\createJson.core.bat server min cuboid_with_square_section_a3 server.min |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[ | ||
{ "url": "file:///P:/ecs_person/websites/anqisoft.github.io/box/cuboid_with_square_section_a3.htm?lang=en&landscape=false&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\local\\pdfs\\en\\portrait.pdf", "params": { } }, | ||
{ "url": "file:///P:/ecs_person/websites/anqisoft.github.io/box/cuboid_with_square_section_a3.htm?lang=en&landscape=true&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\local\\pdfs\\en\\landscape_1.pdf", "params": { } }, | ||
{ "url": "file:///P:/ecs_person/websites/anqisoft.github.io/box/cuboid_with_square_section_a3.htm?lang=en&landscape=true&no=2", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\local\\pdfs\\en\\landscape_2.pdf", "params": { } }, | ||
{ "url": "file:///P:/ecs_person/websites/anqisoft.github.io/box/cuboid_with_square_section_a3.htm?lang=zh_cn&landscape=false&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\local\\pdfs\\zh_cn\\portrait.pdf", "params": { } }, | ||
{ "url": "file:///P:/ecs_person/websites/anqisoft.github.io/box/cuboid_with_square_section_a3.htm?lang=zh_cn&landscape=true&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\local\\pdfs\\zh_cn\\landscape_1.pdf", "params": { } }, | ||
{ "url": "file:///P:/ecs_person/websites/anqisoft.github.io/box/cuboid_with_square_section_a3.htm?lang=zh_cn&landscape=true&no=2", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\local\\pdfs\\zh_cn\\landscape_2.pdf", "params": { } }, | ||
{ "url": "file:///P:/ecs_person/websites/anqisoft.github.io/box/cuboid_with_square_section_a3.htm?lang=zh_tw&landscape=false&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\local\\pdfs\\zh_tw\\portrait.pdf", "params": { } }, | ||
{ "url": "file:///P:/ecs_person/websites/anqisoft.github.io/box/cuboid_with_square_section_a3.htm?lang=zh_tw&landscape=true&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\local\\pdfs\\zh_tw\\landscape_1.pdf", "params": { } }, | ||
{ "url": "file:///P:/ecs_person/websites/anqisoft.github.io/box/cuboid_with_square_section_a3.htm?lang=zh_tw&landscape=true&no=2", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\local\\pdfs\\zh_tw\\landscape_2.pdf", "params": { } } | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[ | ||
{ "url": "file:///P:/ecs_person/websites/anqisoft.github.io/box/cuboid_with_square_section_a3.min.htm?lang=en&landscape=false&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\local.min\\pdfs\\en\\portrait.pdf", "params": { } }, | ||
{ "url": "file:///P:/ecs_person/websites/anqisoft.github.io/box/cuboid_with_square_section_a3.min.htm?lang=en&landscape=true&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\local.min\\pdfs\\en\\landscape_1.pdf", "params": { } }, | ||
{ "url": "file:///P:/ecs_person/websites/anqisoft.github.io/box/cuboid_with_square_section_a3.min.htm?lang=en&landscape=true&no=2", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\local.min\\pdfs\\en\\landscape_2.pdf", "params": { } }, | ||
{ "url": "file:///P:/ecs_person/websites/anqisoft.github.io/box/cuboid_with_square_section_a3.min.htm?lang=zh_cn&landscape=false&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\local.min\\pdfs\\zh_cn\\portrait.pdf", "params": { } }, | ||
{ "url": "file:///P:/ecs_person/websites/anqisoft.github.io/box/cuboid_with_square_section_a3.min.htm?lang=zh_cn&landscape=true&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\local.min\\pdfs\\zh_cn\\landscape_1.pdf", "params": { } }, | ||
{ "url": "file:///P:/ecs_person/websites/anqisoft.github.io/box/cuboid_with_square_section_a3.min.htm?lang=zh_cn&landscape=true&no=2", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\local.min\\pdfs\\zh_cn\\landscape_2.pdf", "params": { } }, | ||
{ "url": "file:///P:/ecs_person/websites/anqisoft.github.io/box/cuboid_with_square_section_a3.min.htm?lang=zh_tw&landscape=false&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\local.min\\pdfs\\zh_tw\\portrait.pdf", "params": { } }, | ||
{ "url": "file:///P:/ecs_person/websites/anqisoft.github.io/box/cuboid_with_square_section_a3.min.htm?lang=zh_tw&landscape=true&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\local.min\\pdfs\\zh_tw\\landscape_1.pdf", "params": { } }, | ||
{ "url": "file:///P:/ecs_person/websites/anqisoft.github.io/box/cuboid_with_square_section_a3.min.htm?lang=zh_tw&landscape=true&no=2", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\local.min\\pdfs\\zh_tw\\landscape_2.pdf", "params": { } } | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[ | ||
{ "url": "https://anqisoft.github.io/box/cuboid_with_square_section_a3.htm?lang=en&landscape=false&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\server\\pdfs\\en\\portrait.pdf", "params": { } }, | ||
{ "url": "https://anqisoft.github.io/box/cuboid_with_square_section_a3.htm?lang=en&landscape=true&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\server\\pdfs\\en\\landscape_1.pdf", "params": { } }, | ||
{ "url": "https://anqisoft.github.io/box/cuboid_with_square_section_a3.htm?lang=en&landscape=true&no=2", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\server\\pdfs\\en\\landscape_2.pdf", "params": { } }, | ||
{ "url": "https://anqisoft.github.io/box/cuboid_with_square_section_a3.htm?lang=zh_cn&landscape=false&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\server\\pdfs\\zh_cn\\portrait.pdf", "params": { } }, | ||
{ "url": "https://anqisoft.github.io/box/cuboid_with_square_section_a3.htm?lang=zh_cn&landscape=true&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\server\\pdfs\\zh_cn\\landscape_1.pdf", "params": { } }, | ||
{ "url": "https://anqisoft.github.io/box/cuboid_with_square_section_a3.htm?lang=zh_cn&landscape=true&no=2", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\server\\pdfs\\zh_cn\\landscape_2.pdf", "params": { } }, | ||
{ "url": "https://anqisoft.github.io/box/cuboid_with_square_section_a3.htm?lang=zh_tw&landscape=false&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\server\\pdfs\\zh_tw\\portrait.pdf", "params": { } }, | ||
{ "url": "https://anqisoft.github.io/box/cuboid_with_square_section_a3.htm?lang=zh_tw&landscape=true&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\server\\pdfs\\zh_tw\\landscape_1.pdf", "params": { } }, | ||
{ "url": "https://anqisoft.github.io/box/cuboid_with_square_section_a3.htm?lang=zh_tw&landscape=true&no=2", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\server\\pdfs\\zh_tw\\landscape_2.pdf", "params": { } } | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[ | ||
{ "url": "https://anqisoft.github.io/box/cuboid_with_square_section_a3.min.htm?lang=en&landscape=false&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\server.min\\pdfs\\en\\portrait.pdf", "params": { } }, | ||
{ "url": "https://anqisoft.github.io/box/cuboid_with_square_section_a3.min.htm?lang=en&landscape=true&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\server.min\\pdfs\\en\\landscape_1.pdf", "params": { } }, | ||
{ "url": "https://anqisoft.github.io/box/cuboid_with_square_section_a3.min.htm?lang=en&landscape=true&no=2", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\server.min\\pdfs\\en\\landscape_2.pdf", "params": { } }, | ||
{ "url": "https://anqisoft.github.io/box/cuboid_with_square_section_a3.min.htm?lang=zh_cn&landscape=false&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\server.min\\pdfs\\zh_cn\\portrait.pdf", "params": { } }, | ||
{ "url": "https://anqisoft.github.io/box/cuboid_with_square_section_a3.min.htm?lang=zh_cn&landscape=true&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\server.min\\pdfs\\zh_cn\\landscape_1.pdf", "params": { } }, | ||
{ "url": "https://anqisoft.github.io/box/cuboid_with_square_section_a3.min.htm?lang=zh_cn&landscape=true&no=2", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\server.min\\pdfs\\zh_cn\\landscape_2.pdf", "params": { } }, | ||
{ "url": "https://anqisoft.github.io/box/cuboid_with_square_section_a3.min.htm?lang=zh_tw&landscape=false&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\server.min\\pdfs\\zh_tw\\portrait.pdf", "params": { } }, | ||
{ "url": "https://anqisoft.github.io/box/cuboid_with_square_section_a3.min.htm?lang=zh_tw&landscape=true&no=1", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\server.min\\pdfs\\zh_tw\\landscape_1.pdf", "params": { } }, | ||
{ "url": "https://anqisoft.github.io/box/cuboid_with_square_section_a3.min.htm?lang=zh_tw&landscape=true&no=2", "pdf": "P:\\ecs_person\\websites\\anqisoft.github.io\\box\\cuboid_with_square_section_a3\\server.min\\pdfs\\zh_tw\\landscape_2.pdf", "params": { } } | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@echo off | ||
@del /s/q "%CD%\..\css\*.min.css" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@echo off | ||
@del /s/q "%CD%\..\js\*.min.js" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@echo off | ||
:: https://www.npmjs.com/package/uglifycss uglifycss - npm | ||
:: http://www.symfonychina.com/doc/current/assetic/uglifyjs.html | ||
:: http://camnpr.com/archives/1007.html | ||
|
||
:: npm i -g uglifycss | ||
:: git clone git://github.com/fmarcia/UglifyCSS.git | ||
:: uglifycss [options] [filename] [...] > output | ||
|
||
set CSS_FOLDE=%CD%\..\css\ | ||
chdir /d "%CSS_FOLDE%" | ||
title "Compressing the css files of %CSS_FOLDER%" | ||
|
||
setlocal enabledelayedexpansion | ||
|
||
for /r . %%a in (*.css) do ( | ||
set src=%%~fa | ||
|
||
REM Use "!src:~-8!", not !src:~-8! | ||
if "!src:~-8!" neq ".min.css" ( | ||
echo !src! | ||
set goal=!src:.css=.min.css! | ||
start /B "" uglifycss !src! > !goal! | ||
) | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@echo off | ||
|
||
:: npm install uglify-js -g | ||
:: git clone git://github.com/mishoo/UglifyJS2.git | ||
:: uglifyjs --help | ||
:: * -o, ¨Coutput [string] | ||
:: * -b, ¨Cbeautify [string] | ||
:: * -m, ¨Cmangle [string] | ||
:: uglifyjs lazyLoad.js -m -o lazyLoad.min.js | ||
|
||
set JS_FOLDER="%CD%\..\js\" | ||
chdir /d %JS_FOLDER% | ||
|
||
setlocal enabledelayedexpansion | ||
|
||
title "Compressing the js files of %JS_FOLDER%" | ||
|
||
for /r . %%a in (*.js) do ( | ||
set src=%%~fa | ||
|
||
REM Use "!src:~-7!", not !src:~-7! | ||
if "!src:~-7!" neq ".min.js" ( | ||
echo !src! | ||
set goal=!src:.js=.min.js! | ||
start /B "" uglifyjs !src! -m -o !goal! | ||
) | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@call compressJs_onlyOne anqi_cuboid_with_square_section.js |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@call compressJs_onlyOne anqi_express_box.js |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@call compressJs_onlyOne anqi_mini_poker.js |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
:: %1: The file name of js before compressing. | ||
|
||
@echo off | ||
:: npm i -g uglify-js | ||
|
||
cd ..\js\ | ||
|
||
set src=%cd%\%1 | ||
set goal=%src:.js=.min.js% | ||
:: echo %src% %goal% | ||
:: start /B "" uglifyjs %src% -m -o %goal% | ||
( | ||
uglifyjs %src% -m -o %goal% | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@echo off | ||
|
||
start /B "" uglifyjs -help >uglifyjs.help.txt | ||
start /B "" uglifycss >uglifycss.help.txt | ||
|
||
exit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Usage: uglifycss [options] file1.css [file2.css [...]] > output | ||
options: | ||
--max-line-len n add a newline every n characters | ||
--expand-vars expand variables | ||
--ugly-comments remove newlines within preserved comments | ||
--cute-comments preserve newlines within and around preserved comments | ||
--convert-urls d convert relative urls using the d directory as location target | ||
--debug print full error stack on error | ||
--output f put the result in f file | ||
--help show this help | ||
--version display version number |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Usage: uglifyjs [files...] [options] | ||
|
||
Options: | ||
-h, --help Print usage information. | ||
`--help options` for details on available options. | ||
-v, -V, --version Print version number. | ||
-p, --parse <options> Specify parser options. | ||
-c, --compress [options] Enable compressor/specify compressor options. | ||
-m, --mangle [options] Mangle names/specify mangler options. | ||
--mangle-props [options] Mangle properties/specify mangler options. | ||
-b, --beautify [options] Beautify output/specify output options. | ||
-O, --output-opts <options> Output options (beautify disabled). | ||
-o, --output <file> Output file (default STDOUT). | ||
--annotations Process and preserve comment annotations. | ||
--no-annotations Ignore and discard comment annotations. | ||
--comments [filter] Preserve copyright comments in the output. | ||
--config-file <file> Read minify() options from JSON file. | ||
-d, --define <expr>[=value] Global definitions. | ||
-e, --enclose [arg[,...][:value[,...]]] Embed everything in a big function, with configurable argument(s) & value(s). | ||
--ie Support non-standard Internet Explorer. | ||
--keep-fargs Do not mangle/drop function arguments. | ||
--keep-fnames Do not mangle/drop function names. Useful for code relying on Function.prototype.name. | ||
--module Process input as ES module (implies --toplevel) | ||
--name-cache <file> File to hold mangled name mappings. | ||
--rename Force symbol expansion. | ||
--no-rename Disable symbol expansion. | ||
--self Build UglifyJS as a library (implies --wrap UglifyJS) | ||
--source-map [options] Enable source map/specify source map options. | ||
--timings Display operations run time on STDERR. | ||
--toplevel Compress and/or mangle variables in toplevel scope. | ||
--v8 Support non-standard Chrome & Node.js. | ||
--validate Perform validation during AST manipulations. | ||
--verbose Print diagnostic messages. | ||
--warn Print warning messages. | ||
--webkit Support non-standard Safari/Webkit. | ||
--wrap <name> Embed everything as a function with “exports” corresponding to “name” globally. | ||
|
||
(internal debug use only) | ||
--in-situ Warning: replaces original source files with minified output. | ||
--reduce-test Reduce a standalone test case (assumes cloned repository). |
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
Oops, something went wrong.