Skip to content

Commit 79ec3f1

Browse files
committed
Added another tool to update acefull.js.gz from sources in addition to tools for embedding of edit.htm file
Changed flags in do.bat to less aggressive edit.htm minifying w/o "Remove space between attributes" See: extras/update_ace.bat Updated examples/SmartSwitch/data/acefull.js.gz Updated Readme
1 parent f71f397 commit 79ec3f1

File tree

6 files changed

+235
-225
lines changed

6 files changed

+235
-225
lines changed
308 Bytes
Binary file not shown.

extras/Readme

+8-12
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,18 @@ Based on https://github.com/birkett/cbintools/tree/master/c2bin and compiled wi
77
Tools used (on Win 10):
88

99
https://www.7-zip.org (install 7z and use gzip - command line)
10-
https://nodejs.org (install node then: npm install html-minifier-terser -g)
10+
https://nodejs.org
11+
(install node and npm install html-minifier-terser -g, npm install -g github-files-fetcher)
1112
https://www.npmjs.com/package/html-minifier-terser
13+
https://www.npmjs.com/package/github-files-fetcher
14+
1215
Optional:
1316
https://bellard.org/tcc/ (to compile ehg.c and rehg.c)
1417

18+
Provided batch files (MS Win)
1519

16-
do.bat: Batch file for generating edit.htm.gz.h
17-
18-
copy ..\src\edit.htm edit_src.htm
19-
call html-minifier-terser --collapse-whitespace --remove-comments --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --remove-tag-whitespace --minify-css true --minify-js true -o edit.htm edit_src.htm
20-
"C:\Program Files\7-Zip\7z.exe" a -tgzip -mx9 edit.htm.gz edit.htm
21-
ehg.exe edit.htm.gz
22-
copy edit.htm.gz.h ..\src\edit.htm.gz.h
20+
do.bat: Generates edit.htm.gz.h
2321

22+
undo.bat: Reverts edit.htm from C array header to file (still minified!)
2423

25-
undo.bat: Batch file to revert from c array header (file still minified!)
26-
copy ..\src\edit.htm.gz.h edit.htm.gz.h
27-
rehg edit.htm.gz.h edit.htm.gz
28-
"C:\Program Files\7-Zip\7z.exe" e -tgzip edit.htm.gz
24+
update_ace.bat: Updates acefull.js.gz from latest Github sources

extras/do.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
copy ..\src\edit.htm edit_src.htm
2-
call html-minifier-terser --collapse-whitespace --remove-comments --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --remove-tag-whitespace --minify-css true --minify-js true -o edit.htm edit_src.htm
2+
call html-minifier-terser --collapse-whitespace --remove-comments --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --minify-css true --minify-js true -o edit.htm edit_src.htm
33
"C:\Program Files\7-Zip\7z.exe" a -tgzip -mx9 edit.htm.gz edit.htm
44
ehg edit.htm.gz
55
copy edit.htm.gz.h ..\src\edit.htm.gz.h

extras/tmp1/placeholder

Whitespace-only changes.

extras/update_ace.bat

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
REM https://www.npmjs.com/package/github-files-fetcher
2+
REM npm install -g github-files-fetcher
3+
REM fetcher --url=resource_url --out=output_directory
4+
5+
call fetcher --url="https://github.com/ajaxorg/ace-builds/blob/master/src-min-noconflict/ace.js" --out=tmp1
6+
call fetcher --url="https://github.com/ajaxorg/ace-builds/blob/master/src-min-noconflict/mode-html.js" --out=tmp1
7+
call fetcher --url="https://github.com/ajaxorg/ace-builds/blob/master/src-min-noconflict/theme-monokai.js" --out=tmp1
8+
9+
cd tmp1
10+
type ace.js mode-html.js theme-monokai.js > acefull.js
11+
"C:\Program Files\7-Zip\7z.exe" a -tgzip -mx9 acefull.js.gz acefull.js
12+
REM update:
13+
copy acefull.js.gz ..\..\examples\SmartSwitch\data\acefull.js.gz
14+
pause

0 commit comments

Comments
 (0)