From 094a600a26d518411f8ad606dbcc0e97abeeb166 Mon Sep 17 00:00:00 2001 From: Lars van Vianen Date: Wed, 3 Jan 2024 01:40:35 +0100 Subject: [PATCH] WIP --- dist/css/icon.gl.css | 100 ----- dist/css/icon.gl.css.map | 1 - dist/css/icon.gl.min.css | 2 - dist/css/icon.gl.min.css.map | 1 - dist/font/icon.gl.css | 29 -- dist/font/icon.gl.eot | Bin 8192 -> 0 bytes dist/font/icon.gl.html | 87 ---- dist/font/icon.gl.json | 5 - dist/font/icon.gl.sass | 33 -- dist/font/icon.gl.scss | 37 -- dist/font/icon.gl.svg | 21 - dist/font/icon.gl.ts | 21 - dist/font/icon.gl.ttf | Bin 2892 -> 0 bytes dist/font/icon.gl.woff | Bin 1896 -> 0 bytes dist/font/icon.gl.woff2 | Bin 1476 -> 0 bytes dist/icons.json | 5 - dist/scss/_animate.scss | 5 +- dist/scss/_button.scss | 72 ++-- dist/scss/_effect.scss | 69 ++++ dist/scss/_figure.scss | 42 ++ dist/scss/_icon.scss | 379 +----------------- dist/scss/_inline.scss | 24 ++ dist/scss/_media.scss | 17 + dist/scss/_size.scss | 109 ++++- dist/scss/_social.scss | 136 +++++++ dist/scss/_svg.scss | 46 +++ dist/scss/index.scss | 2 +- dist/sprite/css/sprite.css | 27 -- dist/sprite/css/svg/sprite.css-48f5e25e.svg | 1 - dist/sprite/css/svg/sprite.css-8eb16979.svg | 1 + dist/sprite/defs/svg/sprite.defs.svg | 2 +- dist/sprite/stack/svg/sprite.stack.svg | 2 +- dist/sprite/symbol/icon.gl.svg | 2 +- dist/sprite/view/svg/sprite.view-8eb16979.svg | 1 + dist/sprite/view/svg/sprite.view-e6d8c712.svg | 1 - dist/svg/admin.svg | 3 - dist/svg/api.svg | 3 - dist/svg/home.svg | 5 - package.json | 4 +- script/js/class/StyleProcessor.js.map | 2 +- script/js/class/SvgPackager.js | 82 ++-- script/js/class/SvgPackager.js.map | 2 +- script/js/index.js | 15 +- script/js/index.js.map | 2 +- script/ts/class/SvgPackager.ts | 206 ++++++---- script/ts/index.ts | 48 ++- 46 files changed, 703 insertions(+), 949 deletions(-) delete mode 100644 dist/css/icon.gl.css delete mode 100644 dist/css/icon.gl.css.map delete mode 100644 dist/css/icon.gl.min.css delete mode 100644 dist/css/icon.gl.min.css.map delete mode 100644 dist/font/icon.gl.css delete mode 100644 dist/font/icon.gl.eot delete mode 100644 dist/font/icon.gl.html delete mode 100644 dist/font/icon.gl.json delete mode 100644 dist/font/icon.gl.sass delete mode 100644 dist/font/icon.gl.scss delete mode 100644 dist/font/icon.gl.svg delete mode 100644 dist/font/icon.gl.ts delete mode 100644 dist/font/icon.gl.ttf delete mode 100644 dist/font/icon.gl.woff delete mode 100644 dist/font/icon.gl.woff2 delete mode 100644 dist/icons.json create mode 100644 dist/scss/_effect.scss create mode 100644 dist/scss/_figure.scss create mode 100644 dist/scss/_inline.scss create mode 100644 dist/scss/_media.scss create mode 100644 dist/scss/_social.scss create mode 100644 dist/scss/_svg.scss delete mode 100644 dist/sprite/css/sprite.css delete mode 100644 dist/sprite/css/svg/sprite.css-48f5e25e.svg create mode 100644 dist/sprite/css/svg/sprite.css-8eb16979.svg create mode 100644 dist/sprite/view/svg/sprite.view-8eb16979.svg delete mode 100644 dist/sprite/view/svg/sprite.view-e6d8c712.svg delete mode 100644 dist/svg/admin.svg delete mode 100644 dist/svg/api.svg delete mode 100644 dist/svg/home.svg diff --git a/dist/css/icon.gl.css b/dist/css/icon.gl.css deleted file mode 100644 index dd8aa44f..00000000 --- a/dist/css/icon.gl.css +++ /dev/null @@ -1,100 +0,0 @@ -/** -* icon.gl -* -* @description Icon Library -* @author Scape Agency (https://www.scape.agency) -* @version v1.0.0 -* @copyright 2020-2023 Scape Agency (https://www.scape.agency) -* @website https://www.icon.gl/ -* @repository https://github.com/scape-agency/icon.gl/ -* @license Apache 2.0 License (https://github.com/scape-agency/icon.gl/blob/main/LICENSE) -*/ -/** -TABLE OF CONTENTS -=============================================================================== -1. -2. -3. -*/ -.igl_1x { - font-size: 1em; -} - -.igl_2x { - font-size: 2em; -} - -.igl_3x { - font-size: 3em; -} - -.igl_4x { - font-size: 4em; -} - -.igl_5x { - font-size: 5em; -} - -.igl_6x { - font-size: 6em; -} - -.igl_7x { - font-size: 7em; -} - -.igl_8x { - font-size: 8em; -} - -.igl_9x { - font-size: 9em; -} - -.igl_10x { - font-size: 10em; -} - -.igl_icon-interactive:hover { - color: #0000cc; - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); - transform: scale(1.1); - transition: all 0.3s ease-in-out; -} -.igl_icon-interactive:focus { - outline: 2px solid #6666ff; -} -.igl_icon-interactive:active { - color: #0000e6; -} -.igl_icon-interactive:disabled { - color: gray; - cursor: not-allowed; -} - -.igl_rotate_90 { - transform: rotate(90deg); -} - -.igl_rotate_180 { - transform: rotate(180deg); -} - -.igl_rotate_270 { - transform: rotate(270deg); -} - -.igl_flip-horizontal { - transform: scale(-1, 1); -} - -.igl_flip-vertical { - transform: scale(1, -1); -} - -.igl_flip-both, -.igl_flip-horizontal.igl_flip-vertical { - transform: scale(1, -1); -} -/*# sourceMappingURL=to.css.map */ \ No newline at end of file diff --git a/dist/css/icon.gl.css.map b/dist/css/icon.gl.css.map deleted file mode 100644 index e161dd55..00000000 --- a/dist/css/icon.gl.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["%3Cinput%20css%20lxcCnl%3E"],"names":[],"mappings":"AAAA;;;;;;;;;;CAUC;AACD;;;;;;CAMC;AACD;EACE,cAAc;AAChB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,cAAc;EACd,wCAAwC;EACxC,qBAAqB;EACrB,gCAAgC;AAClC;AACA;EACE,0BAA0B;AAC5B;AACA;EACE,cAAc;AAChB;AACA;EACE,WAAW;EACX,mBAAmB;AACrB;;AAEA;EACE,wBAAwB;AAC1B;;AAEA;EACE,yBAAyB;AAC3B;;AAEA;EACE,yBAAyB;AAC3B;;AAEA;EACE,uBAAuB;AACzB;;AAEA;EACE,uBAAuB;AACzB;;AAEA;;EAEE,uBAAuB;AACzB","file":"to.css","sourcesContent":["/**\n* icon.gl\n*\n* @description Icon Library\n* @author Scape Agency (https://www.scape.agency)\n* @version v1.0.0\n* @copyright 2020-2023 Scape Agency (https://www.scape.agency)\n* @website https://www.icon.gl/\n* @repository https://github.com/scape-agency/icon.gl/\n* @license Apache 2.0 License (https://github.com/scape-agency/icon.gl/blob/main/LICENSE)\n*/\n/**\nTABLE OF CONTENTS\n===============================================================================\n1.\n2.\n3. \n*/\n.igl_1x {\n font-size: 1em;\n}\n\n.igl_2x {\n font-size: 2em;\n}\n\n.igl_3x {\n font-size: 3em;\n}\n\n.igl_4x {\n font-size: 4em;\n}\n\n.igl_5x {\n font-size: 5em;\n}\n\n.igl_6x {\n font-size: 6em;\n}\n\n.igl_7x {\n font-size: 7em;\n}\n\n.igl_8x {\n font-size: 8em;\n}\n\n.igl_9x {\n font-size: 9em;\n}\n\n.igl_10x {\n font-size: 10em;\n}\n\n.igl_icon-interactive:hover {\n color: #0000cc;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n transform: scale(1.1);\n transition: all 0.3s ease-in-out;\n}\n.igl_icon-interactive:focus {\n outline: 2px solid #6666ff;\n}\n.igl_icon-interactive:active {\n color: #0000e6;\n}\n.igl_icon-interactive:disabled {\n color: gray;\n cursor: not-allowed;\n}\n\n.igl_rotate_90 {\n transform: rotate(90deg);\n}\n\n.igl_rotate_180 {\n transform: rotate(180deg);\n}\n\n.igl_rotate_270 {\n transform: rotate(270deg);\n}\n\n.igl_flip-horizontal {\n transform: scale(-1, 1);\n}\n\n.igl_flip-vertical {\n transform: scale(1, -1);\n}\n\n.igl_flip-both,\n.igl_flip-horizontal.igl_flip-vertical {\n transform: scale(1, -1);\n}"]} \ No newline at end of file diff --git a/dist/css/icon.gl.min.css b/dist/css/icon.gl.min.css deleted file mode 100644 index 1f83198c..00000000 --- a/dist/css/icon.gl.min.css +++ /dev/null @@ -1,2 +0,0 @@ -.igl_1x{font-size:1em}.igl_2x{font-size:2em}.igl_3x{font-size:3em}.igl_4x{font-size:4em}.igl_5x{font-size:5em}.igl_6x{font-size:6em}.igl_7x{font-size:7em}.igl_8x{font-size:8em}.igl_9x{font-size:9em}.igl_10x{font-size:10em}.igl_icon-interactive:hover{box-shadow:0 2px 4px rgba(0,0,0,.2);color:#00c;transform:scale(1.1);transition:all .3s ease-in-out}.igl_icon-interactive:focus{outline:2px solid #66f}.igl_icon-interactive:active{color:#0000e6}.igl_icon-interactive:disabled{color:gray;cursor:not-allowed}.igl_rotate_90{transform:rotate(90deg)}.igl_rotate_180{transform:rotate(180deg)}.igl_rotate_270{transform:rotate(270deg)}.igl_flip-horizontal{transform:scaleX(-1)}.igl_flip-both,.igl_flip-horizontal.igl_flip-vertical,.igl_flip-vertical{transform:scaleY(-1)} -/*# sourceMappingURL=to.css.map */ \ No newline at end of file diff --git a/dist/css/icon.gl.min.css.map b/dist/css/icon.gl.min.css.map deleted file mode 100644 index ba22305a..00000000 --- a/dist/css/icon.gl.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["%3Cinput%20css%208uLBf_%3E"],"names":[],"mappings":"AAAA,QAAQ,aAAa,CAAC,QAAQ,aAAa,CAAC,QAAQ,aAAa,CAAC,QAAQ,aAAa,CAAC,QAAQ,aAAa,CAAC,QAAQ,aAAa,CAAC,QAAQ,aAAa,CAAC,QAAQ,aAAa,CAAC,QAAQ,aAAa,CAAC,SAAS,cAAc,CAAC,4BAAuC,mCAAmC,CAA9C,UAAU,CAAqC,oBAAoB,CAAC,8BAA8B,CAAC,4BAA4B,sBAAsB,CAAC,6BAA6B,aAAa,CAAC,+BAA+B,UAAU,CAAC,kBAAkB,CAAC,eAAe,uBAAuB,CAAC,gBAAgB,wBAAwB,CAAC,gBAAgB,wBAAwB,CAAC,qBAAqB,oBAAsB,CAA2C,yEAAsD,oBAAsB","file":"to.css","sourcesContent":[".igl_1x{font-size:1em}.igl_2x{font-size:2em}.igl_3x{font-size:3em}.igl_4x{font-size:4em}.igl_5x{font-size:5em}.igl_6x{font-size:6em}.igl_7x{font-size:7em}.igl_8x{font-size:8em}.igl_9x{font-size:9em}.igl_10x{font-size:10em}.igl_icon-interactive:hover{color:#00c;box-shadow:0 2px 4px rgba(0,0,0,.2);transform:scale(1.1);transition:all .3s ease-in-out}.igl_icon-interactive:focus{outline:2px solid #66f}.igl_icon-interactive:active{color:#0000e6}.igl_icon-interactive:disabled{color:gray;cursor:not-allowed}.igl_rotate_90{transform:rotate(90deg)}.igl_rotate_180{transform:rotate(180deg)}.igl_rotate_270{transform:rotate(270deg)}.igl_flip-horizontal{transform:scale(-1, 1)}.igl_flip-vertical{transform:scale(1, -1)}.igl_flip-both,.igl_flip-horizontal.igl_flip-vertical{transform:scale(1, -1)}"]} \ No newline at end of file diff --git a/dist/font/icon.gl.css b/dist/font/icon.gl.css deleted file mode 100644 index 65073416..00000000 --- a/dist/font/icon.gl.css +++ /dev/null @@ -1,29 +0,0 @@ -@font-face { - font-family: "icon.gl"; - src: url("./fonts/icon.gl.ttf?e502468a16b65d541fdb879de8121f2b") format("truetype"), -url("./fonts/icon.gl.woff?e502468a16b65d541fdb879de8121f2b") format("woff"), -url("./fonts/icon.gl.woff2?e502468a16b65d541fdb879de8121f2b") format("woff2"), -url("./fonts/icon.gl.eot?e502468a16b65d541fdb879de8121f2b#iefix") format("embedded-opentype"), -url("./fonts/icon.gl.svg?e502468a16b65d541fdb879de8121f2b#icon.gl") format("svg"); -} - -.igl:before { - font-family: icon.gl !important; - font-style: normal; - font-weight: normal !important; - font-variant: normal; - text-transform: none; - line-height: 1; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.igl.igl-admin:before { - content: "\f101"; -} -.igl.igl-api:before { - content: "\f102"; -} -.igl.igl-home:before { - content: "\f103"; -} diff --git a/dist/font/icon.gl.eot b/dist/font/icon.gl.eot deleted file mode 100644 index 7aa4623adc7f1ad964d9f94bf02afbcecf628a70..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8192 zcmeHLTWnlc6+LI}V7!Z2@n!rd{7A?9_0hX7vk{=f~FE6g?`jX2tG=}+UJ}*(?t0} z{X+QK_ujqtS$m&-_T$`RTb5;=SXqC5Yt<6Z$<5Bj(#gVVcVnp##u%f?KH+ti_XsS*PljZKrBM&~m(bxltFi<#=uxq|>Yl zQID;ZYfg1uX+cAxl%j9I7c1M6opWkV85Vu4!jXIoH%9c&sjI!Kv z{Rt&TIoEKd@3;9nYu9QrpjEqEAwTSzOn_7M$S=65_?n0ac%@MD$X?5a-yQ|UsnyF( zBJ6tYPD!IuhKqy|N^Pf76UH4^>a-l&N4NrE^#ur*Fz>54!mpN7k->2s>9}P#>tY4g zha^}s6_X=%c4wVtQ@Uomwum~_Q;j^cF%7L>RG5-DzQk8T=*V8%bz~JbZHgV@tpE)< zZn%8!F|DXD>GtVnxhCT2zbjV7vf;Y# zsDz;|g_c@=%dIH0y$HD#Bv&NHk7Cb;Qkv^^91=E=Yj%ucxk9VS9I0`bUPOdumc?3Bz^OjkYZ5wu8x0;SK2vN)O{$c12yb zh3!bJjtUOzqRpX+hzN4VX~<5PpA?I4`MfoWyj4YQ)m>|nl#p=Iu3%o zOc#0S>k5x4qg2K;McXEGh>4@(+Op9DV!i#kM8gP3uTYT-2~kRD6Doi@Dn+<3Bfe?~ zfEp0%n76S>R@(w#+4zpq&LoydTb>9l(p*LJi0~tyVk@LZB7vxu8CQH`+P3F^6BMjv zdupF`DsY7qY;?77yDw;}jb57GEm%|2VJ0q|GNzWhn>*9t6H|*z%NOZ=@wt`h@bB3e zCj>nr>}960%DK76&RAcZ*oCk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jq?OO5C0d^Ei+^oAu|jW5Cf89EGoZHsJ|#X#3q=7FUP~|Nw&bQ zvRBwO_9c|4%)KKrpOpn6(_bp0F~>NyW+_X>mq9|&!i73|6?H{j8{;W6SeoW#bUR)- z9+c@uIf;Z<>u!3yp3Q(sOUX%&E#wrMUzEituh*Pl+O3w-^(uhlV6*>53PPqiZRkZx z1|Dx}W>6am7$NPMKwv}*n%b}yifAE2GNs6Yflx?`4kq-2q0!vnuOgxI==9+EP$YT& z{D~J}1>E&eBx2}VA`%)5MZECv3)im?4(>jC<5@kT^W*)=cIEUB!aPl5XrI(VAcO~> z(BQ)`Jsygt%!7JjFsg+@1JOu$=<76NQ#_hCUev=^F4mz!91E;6MiZ&rHDLTxKv9h8g*nOU$ zFRFe3k^#1^=m6+lMQfm6RkRNJ4MiK+tG=aZ+PQwH=rEgSzf^RD6?qQ-EZQuutY27K zxwPKdR-AgxFKu63>uy^3J4{K=Ep0AscXpN*t*4*2a3FMcc9yN>?e2zk7N^Cf_4Tf` zwcUMYXZb!}oxy>#D zL)sRzVWDz|#yRoDBV32=fL;XdY4$vx7uj=|$ANT*ErVYMrpq=!ofY;7y^fzQBwJ$a z8Auj@F0)mkwZ-nku0I7$n!k@Pi}h@XoQu>WvUk699^e|+xxtLi;>Oyh*4bLq>ECuf z{KxnH^ - - - - icon.gl - - - - - - - -

icon.gl

- - -
- - - -
- admin -
- - -
- - - -
- api -
- - -
- - - -
- home -
- - - - diff --git a/dist/font/icon.gl.json b/dist/font/icon.gl.json deleted file mode 100644 index 20a1a3cf..00000000 --- a/dist/font/icon.gl.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "admin": 61697, - "api": 61698, - "home": 61699 -} \ No newline at end of file diff --git a/dist/font/icon.gl.sass b/dist/font/icon.gl.sass deleted file mode 100644 index f46c51c4..00000000 --- a/dist/font/icon.gl.sass +++ /dev/null @@ -1,33 +0,0 @@ -$icon.gl-font: "icon.gl" - -@font-face - font-family: $icon.gl-font - src: url("./fonts/icon.gl.ttf?e502468a16b65d541fdb879de8121f2b") format("truetype"), -url("./fonts/icon.gl.woff?e502468a16b65d541fdb879de8121f2b") format("woff"), -url("./fonts/icon.gl.woff2?e502468a16b65d541fdb879de8121f2b") format("woff2"), -url("./fonts/icon.gl.eot?e502468a16b65d541fdb879de8121f2b#iefix") format("embedded-opentype"), -url("./fonts/icon.gl.svg?e502468a16b65d541fdb879de8121f2b#icon.gl") format("svg") - -.igl:before - font-family: icon.gl !important - font-style: normal - font-weight: normal !important - font-variant: normal - text-transform: none - line-height: 1 - -webkit-font-smoothing: antialiased - -moz-osx-font-smoothing: grayscale - - -$icon.gl-map: ( - "admin": "\f101", - "api": "\f102", - "home": "\f103", -) - -.igl.igl-admin:before - content: map-get($icon.gl-map, "admin") -.igl.igl-api:before - content: map-get($icon.gl-map, "api") -.igl.igl-home:before - content: map-get($icon.gl-map, "home") diff --git a/dist/font/icon.gl.scss b/dist/font/icon.gl.scss deleted file mode 100644 index 9a008b92..00000000 --- a/dist/font/icon.gl.scss +++ /dev/null @@ -1,37 +0,0 @@ -$icon.gl-font: "icon.gl"; - -@font-face { - font-family: $icon.gl-font; - src: url("./fonts/icon.gl.ttf?e502468a16b65d541fdb879de8121f2b") format("truetype"), -url("./fonts/icon.gl.woff?e502468a16b65d541fdb879de8121f2b") format("woff"), -url("./fonts/icon.gl.woff2?e502468a16b65d541fdb879de8121f2b") format("woff2"), -url("./fonts/icon.gl.eot?e502468a16b65d541fdb879de8121f2b#iefix") format("embedded-opentype"), -url("./fonts/icon.gl.svg?e502468a16b65d541fdb879de8121f2b#icon.gl") format("svg"); -} - -.igl:before { - font-family: icon.gl !important; - font-style: normal; - font-weight: normal !important; - font-variant: normal; - text-transform: none; - line-height: 1; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -$icon.gl-map: ( - "admin": "\f101", - "api": "\f102", - "home": "\f103", -); - -.igl.igl-admin:before { - content: map-get($icon.gl-map, "admin"); -} -.igl.igl-api:before { - content: map-get($icon.gl-map, "api"); -} -.igl.igl-home:before { - content: map-get($icon.gl-map, "home"); -} diff --git a/dist/font/icon.gl.svg b/dist/font/icon.gl.svg deleted file mode 100644 index 3037a6a7..00000000 --- a/dist/font/icon.gl.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - diff --git a/dist/font/icon.gl.ts b/dist/font/icon.gl.ts deleted file mode 100644 index 9cd118af..00000000 --- a/dist/font/icon.gl.ts +++ /dev/null @@ -1,21 +0,0 @@ -export type IconGlId = - | "admin" - | "api" - | "home"; - -export type IconGlKey = - | "Admin" - | "Api" - | "Home"; - -export enum IconGl { - Admin = "admin", - Api = "api", - Home = "home", -} - -export const ICON_GL_CODEPOINTS: { [key in IconGl]: string } = { - [IconGl.Admin]: "61697", - [IconGl.Api]: "61698", - [IconGl.Home]: "61699", -}; diff --git a/dist/font/icon.gl.ttf b/dist/font/icon.gl.ttf deleted file mode 100644 index 7c5afccfd71343852b26604aee8f4c9feb1716fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2892 zcmd^BU5p!76+U-jdC+0?tW$9A?P4vpG`lA@xdjangSon7xw zYOl?%(=-vSDlMo*q*5hliVzP-P*viI2Pz?iPgm zeL*~O$M@dveD|Dt?!D*!m>3Zm^fJk`a{khjXUpGQxJkrLf_>ugOUsS!>gWCf`4;47 z*M`0E-&ekS7xD*!+Z^23`0VwmO(OZ*MCy2}-&=p`Pv4({?w^s{TOgz#&|iUnj(mJ; zIC(+-+TlIez7IJw7_If>D-8X~uR=}@doPSxh5m{5X~^ZB-mw3E%6N}xN+FU`lYwEx6IP)+>~&Hh{epgv@>5CuI;H9JSOHRHu%D2=u<^(`y?ek8^waN zHR0(fMKcraaTalie2G5ADq=kBsl?_Y_JgoKff}<0uaF<XCe~kMq93ul(oa!i2P8YPK^Lh{J9M3B zA*i!7vsh5&Ztl~}&DW}aE9|m-S86tL`F4qUZkjEzcB|QFx57Hp|^xgcyeaxSm>owy3y%+@li-MXe&ndzM6OZVj~nK?_V zHs&gwOnzzBt+}4$ zs>bzeATou%rhG^_rdrVoZ(3nDv?`9gsFlLgVTmuwPUT&$oK#d51wU(MGUiFsw$0a6 zWmS+U&KkCDtcv1Rq!g(?6l+5L-Y*kluADtGdQIU;x3}#X%`G~*r{kBhQ~1T$DZ1K> z?H0JAaMSv7$$?}!u`Ihqd*+qG{CuG@J*UWv+3b8+DupE{yC^Gj)75R!{embS%9smg zhS{Q=`!Cor*Hu;LDVPAHV~NO&UnuN9lV)gv8hAM#r)Ox5_URS6Mc={}jbq=4BA<^p zL>&IW$HAOu;%EkWvH5ZcD2{NogR_c#B~GoyT&@LOR>x^aRbpBgg&W%`3V5s2^lF`a z4uTgmrx~u0GdTQ-UZ>sAyk;x#IxQ&HAm;yt5a^tDRmB&he`dnw2#! z7i8U#bu|_OV=ArdvYEA&V|uZa{jH&2z)9CG=!SFQ!l@V03#2=`VW^618+ukZ!c^hK zJ9o0#o6p^SPB9dA;>g*}*!?5uUbs=^FUdMUG=eY67(+o6kD4w&rr23i*7dY$q^7?o zJg!E?>fM)=)IQwl`zgh~D7cw0b$fsRD`&DNtieEu-|GzhI(hjRX}E#KT`g{C4PT69 zpmc&2U@yTc{yohln1c@zoT4SFC)mL4^R#$Tl_@Z38YEZ(zL{Vd_|*g}z_$~u;;#B( zg2m1CvjnH;GW{mO2KlVCy*ApZZw@Z@H?IwPyNQ%km;1YW+oPTG1ND`JIp5#u@AfAB z_41V)<-O-O8RXe^_`&7njfAhSjfS+1eLKRt zRHseMM!Zp*xI+ijqur0SeN^)@GNe451@yYk6E0LUOb`KqY3aj^sdkilza3% z{4~H$Xan*FbVf7;Iv4dPvo3Dn_&?IGNAnp*F^@uz dmHp(TFp0@bVJfM;_2Kr8+#7EzTccs0=-*&bUb_GQ diff --git a/dist/font/icon.gl.woff b/dist/font/icon.gl.woff deleted file mode 100644 index 2c3d7cea04c7d97ee50c654492d8c9ab2ec0e930..0000000000000000000000000000000000000000 GIT binary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|IT12ZG77Z?% z^3}fm-3yfXFq|*ZhdzvzgVnH-gvP+3O1n>&?Mog0^6(dt8HN_)ZtYm$Yx!8+xEq!O z04ToMiCT(_4D+v}f|g6I+M=8K8;yhA0bt*Buf%|+(+2?nO#v{#=_^41u4QD6EZ7&`JWI?Sed_(c^dqt|o{Y=MU!Db@KT-lF2+CrX===5e(;T zvs>#sZU>((F^(gbwj-iMp*NqKml8GP1&J>niN-P3(JQ9SXpXvwA??z9BUIj2y9})_ e>u)%LcpWkdL?99=L3s>^{9(cq@sp!sNB{tK$* \ No newline at end of file diff --git a/dist/sprite/css/svg/sprite.css-8eb16979.svg b/dist/sprite/css/svg/sprite.css-8eb16979.svg new file mode 100644 index 00000000..5f25ba6b --- /dev/null +++ b/dist/sprite/css/svg/sprite.css-8eb16979.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/sprite/defs/svg/sprite.defs.svg b/dist/sprite/defs/svg/sprite.defs.svg index 8e629662..a55a9595 100644 --- a/dist/sprite/defs/svg/sprite.defs.svg +++ b/dist/sprite/defs/svg/sprite.defs.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/dist/sprite/stack/svg/sprite.stack.svg b/dist/sprite/stack/svg/sprite.stack.svg index c9d56e7b..3f1d8ac0 100644 --- a/dist/sprite/stack/svg/sprite.stack.svg +++ b/dist/sprite/stack/svg/sprite.stack.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/dist/sprite/symbol/icon.gl.svg b/dist/sprite/symbol/icon.gl.svg index 1f7dedc1..c2f0bd64 100644 --- a/dist/sprite/symbol/icon.gl.svg +++ b/dist/sprite/symbol/icon.gl.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/dist/sprite/view/svg/sprite.view-8eb16979.svg b/dist/sprite/view/svg/sprite.view-8eb16979.svg new file mode 100644 index 00000000..5f25ba6b --- /dev/null +++ b/dist/sprite/view/svg/sprite.view-8eb16979.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/sprite/view/svg/sprite.view-e6d8c712.svg b/dist/sprite/view/svg/sprite.view-e6d8c712.svg deleted file mode 100644 index 8184e672..00000000 --- a/dist/sprite/view/svg/sprite.view-e6d8c712.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/dist/svg/admin.svg b/dist/svg/admin.svg deleted file mode 100644 index ca8ec27b..00000000 --- a/dist/svg/admin.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/dist/svg/api.svg b/dist/svg/api.svg deleted file mode 100644 index 65aeca55..00000000 --- a/dist/svg/api.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/dist/svg/home.svg b/dist/svg/home.svg deleted file mode 100644 index 3aad86a2..00000000 --- a/dist/svg/home.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/package.json b/package.json index 27f7e92c..cef042a4 100644 --- a/package.json +++ b/package.json @@ -44,8 +44,8 @@ ], "main": "src/scss/index.scss", "type": "module", - "module": "dist/js/unit.gl.js", - "style": "dist/css/unit.gl.css", + "module": "dist/js/icon.gl.js", + "style": "dist/css/icon.gl.css", "sass": "src/scss/index.scss", "scripts": { "format": "npx prettier --write .", diff --git a/script/js/class/StyleProcessor.js.map b/script/js/class/StyleProcessor.js.map index f65f4490..143413b3 100644 --- a/script/js/class/StyleProcessor.js.map +++ b/script/js/class/StyleProcessor.js.map @@ -1 +1 @@ -{"version":3,"file":"StyleProcessor.js","sourceRoot":"","sources":["../../ts/class/StyleProcessor.ts"],"names":[],"mappings":";AAqBA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,qBAAqB,MAAM,sCAAsC,CAAC;AACzE,OAAO,uBAAuB,MAAM,wCAAwC,CAAC;AAW7E,MAAM,cAAc;IAQV,c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B,MAAM,sCAAsC,CAAC;AACzE,OAAO,uBAAuB,MAAM,wCAAwC,CAAC;AAW7E,MAAM,cAAc;IAQV,cAAc,CAChB,GAAW,EACX,WAAsC;;YAEtC,MAAM,MAAM,GAAG,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,uBAAuB,CAAC;YAC5F,OAAO,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;QAC7F,CAAC;KAAA;IAQK,aAAa,CACf,SAAiB,EACjB,UAAmC,EACnC,WAAsC;;YAEtC,IAAI,CAAC;gBAGD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAClC,SAAS,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,CACpC,CAAC;gBAGF,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,cAAc,CACvC,MAAM,CAAC,GAAG,EACV,WAAW,CACd,CAAC;gBAGF,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;gBAG5C,IAAI,SAAS,CAAC,GAAG,EAAE,CAAC;oBAChB,EAAE,CAAC,aAAa,CAAC,GAAG,UAAU,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;gBACpE,CAAC;YACL,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBAEX,OAAO,CAAC,KAAK,CAAC,gCAAgC,SAAS,GAAG,EAAE,GAAG,CAAC,CAAC;YACrE,CAAC;QACL,CAAC;KAAA;CACJ;AAOD,eAAe,cAAc,CAAC"} \ No newline at end of file diff --git a/script/js/class/SvgPackager.js b/script/js/class/SvgPackager.js index 14f024ea..99c8c6ab 100644 --- a/script/js/class/SvgPackager.js +++ b/script/js/class/SvgPackager.js @@ -1,30 +1,29 @@ import { __awaiter } from "tslib"; -import * as fs_extra from 'fs-extra'; -import { promises as fs } from 'fs'; -import * as glob from 'glob'; +import * as fs from 'fs/promises'; import * as path from 'path'; -import { fileURLToPath } from "url"; +import * as glob from 'glob'; import SVGO from 'svgo'; import { loadConfig } from 'svgo'; -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); class SvgPackager { - processSvgFiles(directory, outputDirectory, ts_output_directory, json_output_directory) { + constructor(svgoConfigPath) { + this.svgoConfigPath = svgoConfigPath; + } + processSvgFiles(inputDirectory, outputDirectory, ts_output_directory, json_output_directory) { return __awaiter(this, void 0, void 0, function* () { const iconNames = []; try { - console.log(`Processing directory: ${directory}`); - const svgFiles = glob.sync(`${directory}/**/*.svg`); + console.log(`Processing directory: ${inputDirectory}`); + const svgFiles = glob.sync(`${inputDirectory}/**/*.svg`); for (const file of svgFiles) { console.log(`Processing file: ${file}`); const iconName = this.sanitizeFileName(path.basename(file, '.svg')); iconNames.push(iconName); console.log(`Processing icon: ${iconName}`); const svgContent = yield this.readSvgFile(file); - const optimizedSvg = yield this.optimizeSvg(file, svgContent); + const optimizedSvg = yield this.optimizeSvg(svgContent); const resultSvg = optimizedSvg.trim(); - yield this.writeSvgFile(file, iconName, resultSvg, outputDirectory); - yield this.writeTypeScriptFile(file, iconName, resultSvg, ts_output_directory); + yield this.writeSvgFile(iconName, resultSvg, outputDirectory); + yield this.writeTypeScriptFile(iconName, resultSvg, ts_output_directory); } yield this.writeIconsJson(iconNames, json_output_directory); console.log(`Successfully processed ${svgFiles.length} SVG files.`); @@ -37,57 +36,36 @@ class SvgPackager { } readSvgFile(filePath) { return __awaiter(this, void 0, void 0, function* () { - try { - const absolutePath = path.resolve(filePath); - const svgContent = yield fs.readFile(absolutePath, 'utf8'); - return svgContent; - } - catch (error) { - console.error('Error reading file:', filePath, error); - throw error; - } + return fs.readFile(filePath, 'utf8'); }); } sanitizeFileName(fileName) { return fileName.replace(/[^a-zA-Z0-9_]/g, '_'); } - optimizeSvg(filePath, svgContent) { + writeFiles(iconName, svgContent, outputDirectory) { return __awaiter(this, void 0, void 0, function* () { - try { - const config = yield loadConfig(path.join(__dirname, '../config/svgo.config.js')); - const result = yield SVGO.optimize(svgContent, Object.assign({ path: filePath }, config)); - return result.data; - } - catch (error) { - console.error('Error optimizing SVG:', error); - throw error; - } + yield this.writeSvgFile(iconName, svgContent, outputDirectory); + yield this.writeTypeScriptFile(iconName, svgContent, outputDirectory); }); } - writeTypeScriptFile(filePath, iconName, svgContent, outputDirectory) { + optimizeSvg(svgContent) { return __awaiter(this, void 0, void 0, function* () { - try { - const tsContent = `export const icon_${iconName} = \`${svgContent}\`;\n`; - const outputPath = path.join(outputDirectory, `${iconName}.ts`); - yield fs_extra.outputFile(outputPath, tsContent); - } - catch (error) { - console.error(`Error creating TypeScript file for ${filePath}:`, error); - throw error; - } + const config = yield loadConfig(this.svgoConfigPath); + const result = yield SVGO.optimize(svgContent, Object.assign({}, config)); + return result.data.trim(); }); } - writeSvgFile(filePath, iconName, svgContent, outputDirectory) { + writeTypeScriptFile(iconName, svgContent, outputDirectory) { return __awaiter(this, void 0, void 0, function* () { - try { - const outputPath = path.join(outputDirectory, `${iconName}.svg`); - yield fs_extra.outputFile(outputPath, svgContent); - console.log(`SVG file written successfully for ${iconName}`); - } - catch (error) { - console.error(`Error writing SVG file for ${iconName}:`, error); - throw error; - } + const tsContent = `export const icon_${iconName} = \`${svgContent}\`;\n`; + const outputPath = path.join(outputDirectory, `${iconName}.ts`); + yield fs.writeFile(outputPath, tsContent); + }); + } + writeSvgFile(iconName, svgContent, outputDirectory) { + return __awaiter(this, void 0, void 0, function* () { + const outputPath = path.join(outputDirectory, `${iconName}.svg`); + yield fs.writeFile(outputPath, svgContent); }); } writeIconsJson(iconNames, outputDirectory) { @@ -95,7 +73,7 @@ class SvgPackager { try { const jsonContent = JSON.stringify(iconNames, null, 2); const outputPath = path.join(outputDirectory, 'icons.json'); - yield fs_extra.outputFile(outputPath, jsonContent); + yield fs.writeFile(outputPath, jsonContent); console.log('Icons JSON file created successfully'); } catch (error) { diff --git a/script/js/class/SvgPackager.js.map b/script/js/class/SvgPackager.js.map index beb798a0..b67a2a71 100644 --- a/script/js/class/SvgPackager.js.map +++ b/script/js/class/SvgPackager.js.map @@ -1 +1 @@ -{"version":3,"file":"SvgPackager.js","sourceRoot":"","sources":["../../ts/class/SvgPackager.ts"],"names":[],"mappings":";AAsBA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAGlC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAGlD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAW3C,MAAM,WAAW;IAOA,eAAe,CACxB,SAAiB,EACjB,eAAuB,EACvB,mBAA2B,EAC3B,qBAA6B;;YAG7B,MAAM,SAAS,GAAa,EAAE,CAAC;YAE/B,IAAI,CAAC;gBACD,OAAO,CAAC,GAAG,CAAC,yBAAyB,SAAS,EAAE,CAAC,CAAC;gBAElD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,SAAS,WAAW,CAAC,CAAC;gBAEpD,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;oBAC1B,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;oBACxC,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EA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IAAI,CAAC,eAAe,EAAE,GAAG,QAAQ,MAAM,CAAC,CAAC;YACjE,MAAM,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QAC/C,CAAC;KAAA;IAWa,cAAc,CACxB,SAAmB,EACnB,eAAuB;;YAGvB,IAAI,CAAC;gBACD,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;gBACvD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;gBAE5D,MAAM,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;gBAC5C,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;YACxD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,CAAC,gCAAgC,EAAE,KAAK,CAAC,CAAC;gBACvD,MAAM,KAAK,CAAC;YAChB,CAAC;QACL,CAAC;KAAA;CAIJ;AAOD,eAAe,WAAW,CAAC"} \ No newline at end of file diff --git a/script/js/index.js b/script/js/index.js index 96b46bcb..d89f4dfa 100644 --- a/script/js/index.js +++ b/script/js/index.js @@ -23,7 +23,7 @@ const spriteGenerator = new SvgSpriteGenerator(svgspriteConfig); const tsCompiler = new TypeScriptCompiler(tsConfig); const jsMinifier = new JavaScriptMinifier(tensorConfig); const packageCreator = new PackageCreator(packageConfig); -const svgPackager = new SvgPackager(); +const svgPackager = new SvgPackager("./config/svgo.config.js"); const fontGenerator = new FontGenerator(); const styleProcessor = new StyleProcessor(); const versionWriter = new VersionWriter(); @@ -39,9 +39,16 @@ function main() { console.log(`Directory cleaned: ${CONFIG.path.dist}`); console.log('Starting Directory creation...'); yield directoryCreator.createDirectories('.', directories); - console.log('Starting SVG processing...'); - yield svgPackager.processSvgFiles(CONFIG.path.svg_input, CONFIG.path.svg_output, CONFIG.path.ts_output_icons, CONFIG.path.json_output); - console.log('SVG processing completed.'); + try { + const sourceDirectory = 'path/to/source/svg'; + const outputDirectory = 'path/to/output/svg'; + const tsOutputDirectory = 'path/to/output/ts'; + const jsonOutputDirectory = 'path/to/output/json'; + yield svgPackager.processSvgFiles(sourceDirectory, outputDirectory, tsOutputDirectory, jsonOutputDirectory); + } + catch (error) { + console.error('Failed to process SVG files:', error); + } console.log('Starting font generation...'); yield fontGenerator.generateFonts(CONFIG.path.font_input, CONFIG.path.font_output); console.log('Font generation completed.'); diff --git a/script/js/index.js.map b/script/js/index.js.map index 3acb03ce..bfac143b 100644 --- a/script/js/index.js.map +++ b/script/js/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":";AAsBA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,aAAa,MAAM,0BAA0B,CAAC;AACrD,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,cAAc,MAAM,2BAA2B,CAAC;AACvD,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;AAC/D,OAAO,cAAc,MAAM,2BAA2B,CAAC;AACvD,OAAO,aAAa,MAAM,0BAA0B,CAAC;AACrD,OAAO,UAAU,MAAM,uBAAuB,CAAC;AAC/C,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,eAAe,MAAM,4BAA4B,CAAC;AACzD,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;AAC/D,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;AAG/D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,aAAa,MAAM,4BAA4B,CAAA;AACtD,OAAO,QAAQ,MAAM,uBAAuB,CAAA;AAC5C,OAAO,YAAY,MAAM,2BAA2B,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E,SAAS,CAAC,CAAC;gBACvC,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;YAGrD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;YAC/C,CAAC;YAMD,MAAM,WAAW,CAAC,UAAU,CACxB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,EAC5C,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CACjD,CAAA;YASD,MAAM,UAAU,CAAC,UAAU,CACvB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAC9C,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAGrD;iBACA,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;iBAC7D,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAK1B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;QAC/C,CAAC;IAEL,CAAC;CAAA;AAQD,IAAI,EAAE,CAAC"} \ No newline at end of file diff --git a/script/ts/class/SvgPackager.ts b/script/ts/class/SvgPackager.ts index 95e6e158..5b64daa5 100644 --- a/script/ts/class/SvgPackager.ts +++ b/script/ts/class/SvgPackager.ts @@ -19,20 +19,12 @@ // Import // ============================================================================ -// import * as fs from 'fs'; -import * as fs_extra from 'fs-extra'; -import { promises as fs } from 'fs'; // Using promisified fs -import * as glob from 'glob'; +import * as fs from 'fs/promises'; import * as path from 'path'; -import { fileURLToPath } from "url"; +import * as glob from 'glob'; import SVGO from 'svgo'; import { loadConfig } from 'svgo'; -// Convert the current file's URL to a file path -const __filename = fileURLToPath(import.meta.url); - -// Derive the directory name of the current module -const __dirname = path.dirname(__filename); // ============================================================================ // Classes @@ -45,13 +37,19 @@ const __dirname = path.dirname(__filename); */ class SvgPackager { + /** + * Constructor for SvgPackager class. + * Optionally accepts configurations or dependencies. + */ + constructor(private svgoConfigPath: string) {} + /** * Processes all SVG files in a given directory. - * @param directory The directory containing SVG files to process. + * @param inputDirectory The directory containing SVG files to process. * @param outputDirectory The directory where optimized SVGs will be output as TypeScript files. */ public async processSvgFiles( - directory: string, + inputDirectory: string, outputDirectory: string, ts_output_directory: string, json_output_directory: string, @@ -60,9 +58,9 @@ class SvgPackager { const iconNames: string[] = []; try { - console.log(`Processing directory: ${directory}`); + console.log(`Processing directory: ${inputDirectory}`); - const svgFiles = glob.sync(`${directory}/**/*.svg`); + const svgFiles = glob.sync(`${inputDirectory}/**/*.svg`); for (const file of svgFiles) { console.log(`Processing file: ${file}`); @@ -70,19 +68,20 @@ class SvgPackager { iconNames.push(iconName); console.log(`Processing icon: ${iconName}`); const svgContent = await this.readSvgFile(file); - const optimizedSvg = await this.optimizeSvg(file, svgContent); + const optimizedSvg = await this.optimizeSvg(svgContent); + // const optimizedSvg = await this.optimizeSvg(file, svgContent); // svgo will always add a final newline when in pretty mode const resultSvg = optimizedSvg.trim() // Write the optimized SVG file await this.writeSvgFile( - file, + // file, iconName, resultSvg, outputDirectory ); // Write the optimized TypeScript file await this.writeTypeScriptFile( - file, + // file, iconName, resultSvg, ts_output_directory @@ -95,31 +94,71 @@ class SvgPackager { throw error; } } + // public async processSvgFiles(directory: string, outputDirectory: string): Promise { + // try { + // console.log(`Processing directory: ${directory}`); + // const svgFiles = await this.findSvgFiles(directory); + + // for (const file of svgFiles) { + // const iconName = this.sanitizeFileName(path.basename(file, '.svg')); + // console.log(`Processing file: ${file}`); + + // const svgContent = await this.readSvgFile(file); + // const optimizedSvg = await this.optimizeSvg(svgContent); + // await this.writeFiles(iconName, optimizedSvg, outputDirectory); + // } + + // console.log(`Successfully processed ${svgFiles.length} SVG files.`); + // } catch (error) { + // console.error('Error processing SVG files:', error); + // throw error; + // } + // } + + + // private async findSvgFiles(directory: string): Promise { + // return new Promise((resolve, reject) => { + // glob(`${directory}/**/*.svg`, (err, files) => { + // if (err) reject(err); + // else resolve(files); + // }); + // }); + // } /** * Reads the content of an SVG file. * @param filePath The path to the SVG file. * @returns The content of the SVG file. */ + // private async readSvgFile(filePath: string): Promise { + // try { + // const absolutePath = path.resolve(filePath); + // const svgContent = await fs.readFile(absolutePath, 'utf8'); + // return svgContent; + // } catch (error) { + // console.error('Error reading file:', filePath, error); + // throw error; + // } + // } private async readSvgFile(filePath: string): Promise { - try { - const absolutePath = path.resolve(filePath); - const svgContent = await fs.readFile(absolutePath, 'utf8'); - return svgContent; - } catch (error) { - console.error('Error reading file:', filePath, error); - throw error; - } + return fs.readFile(filePath, 'utf8'); } - /** * Sanitizes a file name to be a valid TypeScript identifier. * @param fileName The original file name. * @returns A sanitized version of the file name. */ + // private sanitizeFileName(fileName: string): string { + // // Implement more robust sanitization logic if necessary + // return fileName.replace(/[^a-zA-Z0-9_]/g, '_'); + // } private sanitizeFileName(fileName: string): string { - // Implement more robust sanitization logic if necessary - return fileName.replace(/[^a-zA-Z0-9_]/g, '_'); + return fileName.replace(/[^a-zA-Z0-9_]/g, '_'); + } + + private async writeFiles(iconName: string, svgContent: string, outputDirectory: string): Promise { + await this.writeSvgFile(iconName, svgContent, outputDirectory); + await this.writeTypeScriptFile(iconName, svgContent, outputDirectory); } /** @@ -127,49 +166,59 @@ class SvgPackager { * @param svgContent The raw SVG content. * @returns The optimized SVG content. */ - private async optimizeSvg( - filePath: string, - svgContent: string - ): Promise { + // private async optimizeSvg( + // filePath: string, + // svgContent: string + // ): Promise { - try { + // try { - const config = await loadConfig( - path.join(__dirname, '../config/svgo.config.js') - ) + // const config = await loadConfig( + // path.join(__dirname, '../config/svgo.config.js') + // ) - const result = await SVGO.optimize( - svgContent, - { path: filePath, ...config } // Add SVGO options if needed - ); + // const result = await SVGO.optimize( + // svgContent, + // { path: filePath, ...config } // Add SVGO options if needed + // ); - return result.data; - } catch (error) { - console.error('Error optimizing SVG:', error); - throw error; - } + // return result.data; + // } catch (error) { + // console.error('Error optimizing SVG:', error); + // throw error; + // } + // } + private async optimizeSvg(svgContent: string): Promise { + const config = await loadConfig(this.svgoConfigPath); + const result = await SVGO.optimize(svgContent, { ...config }); + return result.data.trim(); } - /** * Creates a TypeScript file from SVG content. * @param filePath The path of the SVG file. * @param svgContent The optimized SVG content. * @param outputDirectory The directory to output the TypeScript file. */ - private async writeTypeScriptFile( - filePath: string, - iconName: string, - svgContent: string, - outputDirectory: string - ): Promise { - try { - const tsContent = `export const icon_${iconName} = \`${svgContent}\`;\n`; - const outputPath = path.join(outputDirectory, `${iconName}.ts`); - await fs_extra.outputFile(outputPath, tsContent); - } catch (error) { - console.error(`Error creating TypeScript file for ${filePath}:`, error); - throw error; - } + // private async writeTypeScriptFile( + // filePath: string, + // iconName: string, + // svgContent: string, + // outputDirectory: string + // ): Promise { + // try { + // const tsContent = `export const icon_${iconName} = \`${svgContent}\`;\n`; + // const outputPath = path.join(outputDirectory, `${iconName}.ts`); + // await fs.writeFile(outputPath, tsContent); + // } catch (error) { + // console.error(`Error creating TypeScript file for ${filePath}:`, error); + // throw error; + // } + // } + + private async writeTypeScriptFile(iconName: string, svgContent: string, outputDirectory: string): Promise { + const tsContent = `export const icon_${iconName} = \`${svgContent}\`;\n`; + const outputPath = path.join(outputDirectory, `${iconName}.ts`); + await fs.writeFile(outputPath, tsContent); } /** @@ -178,20 +227,24 @@ class SvgPackager { * @param svgContent The SVG content to be written. * @param outputDirectory The directory to output the SVG file. */ - private async writeSvgFile( - filePath: string, - iconName: string, - svgContent: string, - outputDirectory: string - ): Promise { - try { - const outputPath = path.join(outputDirectory, `${iconName}.svg`); - await fs_extra.outputFile(outputPath, svgContent); - console.log(`SVG file written successfully for ${iconName}`); - } catch (error) { - console.error(`Error writing SVG file for ${iconName}:`, error); - throw error; - } + // private async writeSvgFile( + // filePath: string, + // iconName: string, + // svgContent: string, + // outputDirectory: string + // ): Promise { + // try { + // const outputPath = path.join(outputDirectory, `${iconName}.svg`); + // await fs_extra.outputFile(outputPath, svgContent); + // console.log(`SVG file written successfully for ${iconName}`); + // } catch (error) { + // console.error(`Error writing SVG file for ${iconName}:`, error); + // throw error; + // } + // } + private async writeSvgFile(iconName: string, svgContent: string, outputDirectory: string): Promise { + const outputPath = path.join(outputDirectory, `${iconName}.svg`); + await fs.writeFile(outputPath, svgContent); } /** @@ -211,7 +264,8 @@ class SvgPackager { try { const jsonContent = JSON.stringify(iconNames, null, 2); const outputPath = path.join(outputDirectory, 'icons.json'); - await fs_extra.outputFile(outputPath, jsonContent); + // await fs_extra.outputFile(outputPath, jsonContent); + await fs.writeFile(outputPath, jsonContent); console.log('Icons JSON file created successfully'); } catch (error) { console.error('Error writing icons JSON file:', error); @@ -219,6 +273,8 @@ class SvgPackager { } } + + } diff --git a/script/ts/index.ts b/script/ts/index.ts index 87e46f47..accd1d84 100644 --- a/script/ts/index.ts +++ b/script/ts/index.ts @@ -53,7 +53,7 @@ const spriteGenerator = new SvgSpriteGenerator(svgspriteConfig); const tsCompiler = new TypeScriptCompiler(tsConfig); const jsMinifier = new JavaScriptMinifier(tensorConfig); const packageCreator = new PackageCreator(packageConfig); -const svgPackager = new SvgPackager(); +const svgPackager = new SvgPackager("./config/svgo.config.js"); const fontGenerator = new FontGenerator(); const styleProcessor = new StyleProcessor(); const versionWriter = new VersionWriter(); @@ -92,14 +92,44 @@ async function main() { // SVG // -------------------------------------------------------------------- - console.log('Starting SVG processing...'); - await svgPackager.processSvgFiles( - CONFIG.path.svg_input, - CONFIG.path.svg_output, - CONFIG.path.ts_output_icons, - CONFIG.path.json_output, - ); - console.log('SVG processing completed.'); + + + + + + + // async function processSvgs() { + try { + const sourceDirectory = 'path/to/source/svg'; + const outputDirectory = 'path/to/output/svg'; + const tsOutputDirectory = 'path/to/output/ts'; + const jsonOutputDirectory = 'path/to/output/json'; + + await svgPackager.processSvgFiles( + sourceDirectory, + outputDirectory, + tsOutputDirectory, + jsonOutputDirectory + ); + } catch (error) { + console.error('Failed to process SVG files:', error); + } + // } + + // processSvgs(); + + + + + + // console.log('Starting SVG processing...'); + // await svgPackager.processSvgFiles( + // CONFIG.path.svg_input, + // CONFIG.path.svg_output, + // CONFIG.path.ts_output_icons, + // CONFIG.path.json_output, + // ); + // console.log('SVG processing completed.'); // Font