From 97fe8dccbf64cd36c4cdac47038eee7279b02c42 Mon Sep 17 00:00:00 2001 From: Lars van Vianen Date: Wed, 3 Jan 2024 23:58:28 +0100 Subject: [PATCH] v0.0.3 --- VERSION | 2 +- dist/package.json | 2 +- package-lock.json | 20 +- package.json | 6 +- script/js/class/DirectoryCleaner.js | 20 -- script/js/class/DirectoryCleaner.js.map | 1 - script/js/class/DirectoryCopier.js | 30 -- script/js/class/DirectoryCopier.js.map | 1 - script/js/class/DirectoryCreator.js | 21 -- script/js/class/DirectoryCreator.js.map | 1 - script/js/class/FileCopier.js | 21 -- script/js/class/FileCopier.js.map | 1 - script/js/class/FileRenamer.js | 18 -- script/js/class/FileRenamer.js.map | 1 - script/js/class/FontGenerator.js | 50 --- script/js/class/FontGenerator.js.map | 1 - script/js/class/JavaScriptMinifier.js | 28 -- script/js/class/JavaScriptMinifier.js.map | 1 - script/js/class/PackageCreator.js | 18 -- script/js/class/PackageCreator.js.map | 1 - script/js/class/StyleProcessor.js | 31 -- script/js/class/StyleProcessor.js.map | 1 - script/js/class/SvgPackager.js | 87 ------ script/js/class/SvgPackager.js.map | 1 - script/js/class/SvgSpriteGenerator.js | 41 --- script/js/class/SvgSpriteGenerator.js.map | 1 - script/js/class/TypeScriptCompiler.js | 36 --- script/js/class/TypeScriptCompiler.js.map | 1 - script/js/class/VersionWriter.js | 17 -- script/js/class/VersionWriter.js.map | 1 - script/js/config/config.js | 21 -- script/js/config/config.js.map | 1 - script/js/config/fantasticon.config.js | 2 - script/js/config/fantasticon.config.js.map | 1 - script/js/config/package.config.js | 22 -- script/js/config/package.config.js.map | 1 - script/js/config/postcss.config.compressed.js | 12 - .../config/postcss.config.compressed.js.map | 1 - script/js/config/postcss.config.expanded.js | 8 - .../js/config/postcss.config.expanded.js.map | 1 - script/js/config/svgo.config.js | 71 ----- script/js/config/svgo.config.js.map | 1 - script/js/config/svgsprite.config.js | 44 --- script/js/config/svgsprite.config.js.map | 1 - script/js/config/terser.config.js | 19 -- script/js/config/terser.config.js.map | 1 - script/js/config/ts.config.js | 3 - script/js/config/ts.config.js.map | 1 - script/js/interfaces/File.js | 2 - script/js/interfaces/File.js.map | 1 - script/js/interfaces/PackageJson.js | 2 - script/js/interfaces/PackageJson.js.map | 1 - script/js/interfaces/SVG.js | 2 - script/js/interfaces/SVG.js.map | 1 - script/ts/class/DirectoryCleaner.ts | 58 ---- script/ts/class/DirectoryCopier.ts | 77 ----- script/ts/class/DirectoryCreator.ts | 64 ---- script/ts/class/FileCopier.ts | 63 ---- script/ts/class/FileRenamer.ts | 58 ---- script/ts/class/FontGenerator.ts | 133 -------- script/ts/class/JavaScriptMinifier.ts | 82 ----- script/ts/class/PackageCreator.ts | 65 ---- script/ts/class/StyleProcessor.ts | 96 ------ script/ts/class/SvgPackager.ts | 285 ------------------ script/ts/class/SvgSpriteGenerator.ts | 98 ------ script/ts/class/TypeScriptCompiler.ts | 112 ------- script/ts/class/VersionWriter.ts | 57 ---- script/ts/config/config.ts | 24 -- script/ts/config/fantasticon.config.ts | 88 ------ script/ts/config/package.config.ts | 55 ---- script/ts/config/postcss.config.compressed.ts | 47 --- script/ts/config/postcss.config.expanded.ts | 42 --- script/ts/config/svgo.config.ts | 115 ------- script/ts/config/svgsprite.config.ts | 137 --------- script/ts/config/terser.config.ts | 28 -- script/ts/config/ts.config.ts | 116 ------- script/ts/interfaces/File.ts | 4 - script/ts/interfaces/PackageJson.ts | 70 ----- script/ts/interfaces/SVG.ts | 12 - 79 files changed, 15 insertions(+), 2652 deletions(-) delete mode 100644 script/js/class/DirectoryCleaner.js delete mode 100644 script/js/class/DirectoryCleaner.js.map delete mode 100644 script/js/class/DirectoryCopier.js delete mode 100644 script/js/class/DirectoryCopier.js.map delete mode 100644 script/js/class/DirectoryCreator.js delete mode 100644 script/js/class/DirectoryCreator.js.map delete mode 100644 script/js/class/FileCopier.js delete mode 100644 script/js/class/FileCopier.js.map delete mode 100644 script/js/class/FileRenamer.js delete mode 100644 script/js/class/FileRenamer.js.map delete mode 100644 script/js/class/FontGenerator.js delete mode 100644 script/js/class/FontGenerator.js.map delete mode 100644 script/js/class/JavaScriptMinifier.js delete mode 100644 script/js/class/JavaScriptMinifier.js.map delete mode 100644 script/js/class/PackageCreator.js delete mode 100644 script/js/class/PackageCreator.js.map delete mode 100644 script/js/class/StyleProcessor.js delete mode 100644 script/js/class/StyleProcessor.js.map delete mode 100644 script/js/class/SvgPackager.js delete mode 100644 script/js/class/SvgPackager.js.map delete mode 100644 script/js/class/SvgSpriteGenerator.js delete mode 100644 script/js/class/SvgSpriteGenerator.js.map delete mode 100644 script/js/class/TypeScriptCompiler.js delete mode 100644 script/js/class/TypeScriptCompiler.js.map delete mode 100644 script/js/class/VersionWriter.js delete mode 100644 script/js/class/VersionWriter.js.map delete mode 100644 script/js/config/config.js delete mode 100644 script/js/config/config.js.map delete mode 100644 script/js/config/fantasticon.config.js delete mode 100644 script/js/config/fantasticon.config.js.map delete mode 100644 script/js/config/package.config.js delete mode 100644 script/js/config/package.config.js.map delete mode 100644 script/js/config/postcss.config.compressed.js delete mode 100644 script/js/config/postcss.config.compressed.js.map delete mode 100644 script/js/config/postcss.config.expanded.js delete mode 100644 script/js/config/postcss.config.expanded.js.map delete mode 100644 script/js/config/svgo.config.js delete mode 100644 script/js/config/svgo.config.js.map delete mode 100644 script/js/config/svgsprite.config.js delete mode 100644 script/js/config/svgsprite.config.js.map delete mode 100644 script/js/config/terser.config.js delete mode 100644 script/js/config/terser.config.js.map delete mode 100644 script/js/config/ts.config.js delete mode 100644 script/js/config/ts.config.js.map delete mode 100644 script/js/interfaces/File.js delete mode 100644 script/js/interfaces/File.js.map delete mode 100644 script/js/interfaces/PackageJson.js delete mode 100644 script/js/interfaces/PackageJson.js.map delete mode 100644 script/js/interfaces/SVG.js delete mode 100644 script/js/interfaces/SVG.js.map delete mode 100644 script/ts/class/DirectoryCleaner.ts delete mode 100644 script/ts/class/DirectoryCopier.ts delete mode 100644 script/ts/class/DirectoryCreator.ts delete mode 100644 script/ts/class/FileCopier.ts delete mode 100644 script/ts/class/FileRenamer.ts delete mode 100644 script/ts/class/FontGenerator.ts delete mode 100644 script/ts/class/JavaScriptMinifier.ts delete mode 100644 script/ts/class/PackageCreator.ts delete mode 100644 script/ts/class/StyleProcessor.ts delete mode 100644 script/ts/class/SvgPackager.ts delete mode 100644 script/ts/class/SvgSpriteGenerator.ts delete mode 100644 script/ts/class/TypeScriptCompiler.ts delete mode 100644 script/ts/class/VersionWriter.ts delete mode 100644 script/ts/config/config.ts delete mode 100644 script/ts/config/fantasticon.config.ts delete mode 100644 script/ts/config/package.config.ts delete mode 100644 script/ts/config/postcss.config.compressed.ts delete mode 100644 script/ts/config/postcss.config.expanded.ts delete mode 100644 script/ts/config/svgo.config.ts delete mode 100644 script/ts/config/svgsprite.config.ts delete mode 100644 script/ts/config/terser.config.ts delete mode 100644 script/ts/config/ts.config.ts delete mode 100644 script/ts/interfaces/File.ts delete mode 100644 script/ts/interfaces/PackageJson.ts delete mode 100644 script/ts/interfaces/SVG.ts diff --git a/VERSION b/VERSION index 7bcd0e36..6812f812 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.2 \ No newline at end of file +0.0.3 \ No newline at end of file diff --git a/dist/package.json b/dist/package.json index 1c5c6a9e..f43743ad 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "icon.gl", - "version": "0.0.2", + "version": "0.0.3", "description": "icon.gl is a icon library and framework developed by Scape Agency.", "keywords": [ "icon.gl", diff --git a/package-lock.json b/package-lock.json index dc774e0e..a1216232 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "icon.gl", - "version": "0.0.2", + "version": "0.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "icon.gl", - "version": "0.0.2", + "version": "0.0.3", "funding": [ { "type": "github", @@ -37,8 +37,8 @@ "eslint-plugin-prettier": "^5.0.1", "grid.gl": "^0.0.1", "html-webpack-plugin": "^5.5.3", - "hue.gl": "^0.0.4", - "icon.gl": "^0.0.1", + "hue.gl": "^0.0.6", + "icon.gl": "^0.0.2", "loop.gl": "^0.0.1", "mini-css-extract-plugin": "^2.7.6", "pack.gl": "^0.0.24", @@ -8892,9 +8892,9 @@ } }, "node_modules/hue.gl": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/hue.gl/-/hue.gl-0.0.4.tgz", - "integrity": "sha512-EFiwoW6ug5tO2Ljd6nnqgkttFxR1L9gXl8ESy5/0xKDyc7UKKzfdgN1DbFDhRthREuvPZqXjqQomsHvLb8w5lw==", + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/hue.gl/-/hue.gl-0.0.6.tgz", + "integrity": "sha512-ptHEkHra3ufrgWewnlbsXNB90dl8dg/iviNdtuk08mCP2D8rGxuEsXTRfF4+UL4+aNB5LA4Ala7T5PhDTjnitQ==", "dev": true }, "node_modules/human-signals": { @@ -8916,9 +8916,9 @@ } }, "node_modules/icon.gl": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/icon.gl/-/icon.gl-0.0.1.tgz", - "integrity": "sha512-agQ5puunf9DDrTlzDl4ybT+xVMcBYWvq/L1yoKpFW7cCubYAFFbnQi8cOsW1d98P29761QXlacvP5F/f3N9JxA==", + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/icon.gl/-/icon.gl-0.0.2.tgz", + "integrity": "sha512-m1y1QBEA7uIKzMTxX+mZbZNtFhx2UJdfcRfyPENUaswA1AoSA0vlInpTMkGfYQ1If//2f1Gfg6rhzav03tjIGw==", "dev": true }, "node_modules/iconv-lite": { diff --git a/package.json b/package.json index 198f4b74..c3843580 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "icon.gl", "description": "icon.gl is a icon library and framework developed by Scape Agency.", - "version": "0.0.2", + "version": "0.0.3", "config": { "version_short": "0.0" }, @@ -88,8 +88,8 @@ "eslint-plugin-prettier": "^5.0.1", "grid.gl": "^0.0.1", "html-webpack-plugin": "^5.5.3", - "hue.gl": "^0.0.4", - "icon.gl": "^0.0.1", + "hue.gl": "^0.0.6", + "icon.gl": "^0.0.2", "loop.gl": "^0.0.1", "mini-css-extract-plugin": "^2.7.6", "pack.gl": "^0.0.24", diff --git a/script/js/class/DirectoryCleaner.js b/script/js/class/DirectoryCleaner.js deleted file mode 100644 index da46ff7d..00000000 --- a/script/js/class/DirectoryCleaner.js +++ /dev/null @@ -1,20 +0,0 @@ -import fs from 'fs'; -import path from 'path'; -class DirectoryCleaner { - cleanDirectory(dirPath) { - if (fs.existsSync(dirPath)) { - fs.readdirSync(dirPath).forEach(file => { - const curPath = path.join(dirPath, file); - if (fs.lstatSync(curPath).isDirectory()) { - this.cleanDirectory(curPath); - } - else { - fs.unlinkSync(curPath); - } - }); - fs.rmdirSync(dirPath); - } - } -} -export default DirectoryCleaner; -//# sourceMappingURL=DirectoryCleaner.js.map \ No newline at end of file diff --git a/script/js/class/DirectoryCleaner.js.map b/script/js/class/DirectoryCleaner.js.map deleted file mode 100644 index 8b57cb7e..00000000 --- a/script/js/class/DirectoryCleaner.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DirectoryCleaner.js","sourceRoot":"","sources":["../../ts/class/DirectoryCleaner.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAOxB,MAAM,gBAAgB;IAMX,cAAc,CAAC,OAAe;QACjC,IAAI,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;YACzB,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;gBACnC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBAEzC,IAAI,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;oBACtC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;gBACjC,CAAC;qBAAM,CAAC;oBACJ,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;gBAC3B,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC1B,CAAC;IACL,CAAC;CACJ;AAOD,eAAe,gBAAgB,CAAC"} \ No newline at end of file diff --git a/script/js/class/DirectoryCopier.js b/script/js/class/DirectoryCopier.js deleted file mode 100644 index e348b1a5..00000000 --- a/script/js/class/DirectoryCopier.js +++ /dev/null @@ -1,30 +0,0 @@ -import { __awaiter } from "tslib"; -import fs from 'fs'; -import path from 'path'; -class DirectoryCopier { - copyFiles(srcDir, destDir) { - return __awaiter(this, void 0, void 0, function* () { - try { - const resolvedSrcDir = path.resolve(srcDir); - const resolvedDestDir = path.resolve(destDir); - const files = fs.readdirSync(resolvedSrcDir); - console.log("FILES:", files); - files.forEach(file => { - const srcFile = path.join(resolvedSrcDir, file); - const destFile = path.join(resolvedDestDir, file); - if (fs.statSync(srcFile).isFile()) { - console.log("Copying file:", srcFile); - fs.copyFileSync(srcFile, destFile); - } - }); - console.log(`Files copied from ${resolvedSrcDir} to ${resolvedDestDir}`); - } - catch (error) { - console.error('Error copying files:', error); - throw error; - } - }); - } -} -export default DirectoryCopier; -//# sourceMappingURL=DirectoryCopier.js.map \ No newline at end of file diff --git a/script/js/class/DirectoryCopier.js.map b/script/js/class/DirectoryCopier.js.map deleted file mode 100644 index 67515758..00000000 --- a/script/js/class/DirectoryCopier.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DirectoryCopier.js","sourceRoot":"","sources":["../../ts/class/DirectoryCopier.ts"],"names":[],"mappings":";AAqBA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAUxB,MAAM,eAAe;IAaX,SAAS,CAAC,MAAc,EAAE,OAAe;;YAC3C,IAAI,CAAC;gBACD,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBAC5C,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gBAE9C,MAAM,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;gBAC7C,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;gBAE7B,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;oBACjB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;oBAChD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;oBAElD,IAAI,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;wBAChC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;wBACtC,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;oBACvC,CAAC;gBACL,CAAC,CAAC,CAAC;gBAEH,OAAO,CAAC,GAAG,CAAC,qBAAqB,cAAc,OAAO,eAAe,EAAE,CAAC,CAAC;YAC7E,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;gBAC7C,MAAM,KAAK,CAAC;YAChB,CAAC;QACL,CAAC;KAAA;CACJ;AAOD,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/script/js/class/DirectoryCreator.js b/script/js/class/DirectoryCreator.js deleted file mode 100644 index 812053bb..00000000 --- a/script/js/class/DirectoryCreator.js +++ /dev/null @@ -1,21 +0,0 @@ -import { __awaiter } from "tslib"; -import fs from 'fs'; -import path from 'path'; -class DirectoryCreator { - createDirectories(basePath, directories) { - return __awaiter(this, void 0, void 0, function* () { - directories.forEach(dir => { - const dirPath = path.join(basePath, dir); - if (!fs.existsSync(dirPath)) { - fs.mkdirSync(dirPath, { recursive: true }); - console.log(`Directory created: ${dirPath}`); - } - else { - console.log(`Directory already exists: ${dirPath}`); - } - }); - }); - } -} -export default DirectoryCreator; -//# sourceMappingURL=DirectoryCreator.js.map \ No newline at end of file diff --git a/script/js/class/DirectoryCreator.js.map b/script/js/class/DirectoryCreator.js.map deleted file mode 100644 index faa46ee2..00000000 --- a/script/js/class/DirectoryCreator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DirectoryCreator.js","sourceRoot":"","sources":["../../ts/class/DirectoryCreator.ts"],"names":[],"mappings":";AAqBA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAUvB,MAAM,gBAAgB;IAab,iBAAiB,CAAC,QAAgB,EAAE,WAAqB;;YAC3D,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBACtB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;gBACzC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;oBAC1B,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;oBAC3C,OAAO,CAAC,GAAG,CAAC,sBAAsB,OAAO,EAAE,CAAC,CAAC;gBACjD,CAAC;qBAAM,CAAC;oBACJ,OAAO,CAAC,GAAG,CAAC,6BAA6B,OAAO,EAAE,CAAC,CAAC;gBACxD,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;CACJ;AAOD,eAAe,gBAAgB,CAAC"} \ No newline at end of file diff --git a/script/js/class/FileCopier.js b/script/js/class/FileCopier.js deleted file mode 100644 index 8abacb13..00000000 --- a/script/js/class/FileCopier.js +++ /dev/null @@ -1,21 +0,0 @@ -import { __awaiter } from "tslib"; -import fs from 'fs'; -import path from 'path'; -class FileCopier { - copyFileToDirectory(srcFile, destDir) { - return __awaiter(this, void 0, void 0, function* () { - try { - const fileName = path.basename(srcFile); - const destFilePath = path.join(destDir, fileName); - yield fs.promises.copyFile(srcFile, destFilePath); - console.log(`File copied from ${srcFile} to ${destFilePath}`); - } - catch (error) { - console.error('Error copying file:', error); - throw error; - } - }); - } -} -export default FileCopier; -//# sourceMappingURL=FileCopier.js.map \ No newline at end of file diff --git a/script/js/class/FileCopier.js.map b/script/js/class/FileCopier.js.map deleted file mode 100644 index dae10c8c..00000000 --- a/script/js/class/FileCopier.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FileCopier.js","sourceRoot":"","sources":["../../ts/class/FileCopier.ts"],"names":[],"mappings":";AAqBA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAUvB,MAAM,UAAU;IAQP,mBAAmB,CACrB,OAAe,EACf,OAAe;;YAEf,IAAI,CAAC;gBACD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;gBACxC,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;gBAClD,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;gBAClD,OAAO,CAAC,GAAG,CAAC,oBAAoB,OAAO,OAAO,YAAY,EAAE,CAAC,CAAC;YAClE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAC;gBAC5C,MAAM,KAAK,CAAC;YAChB,CAAC;QACL,CAAC;KAAA;CAEJ;AAOD,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/script/js/class/FileRenamer.js b/script/js/class/FileRenamer.js deleted file mode 100644 index 0a5d6fdb..00000000 --- a/script/js/class/FileRenamer.js +++ /dev/null @@ -1,18 +0,0 @@ -import { __awaiter } from "tslib"; -import fs from 'fs'; -class FileRenamer { - renameFile(srcPath, targetPath) { - return __awaiter(this, void 0, void 0, function* () { - try { - yield fs.promises.rename(srcPath, targetPath); - console.log(`File renamed from ${srcPath} to ${targetPath}`); - } - catch (error) { - console.error('Error renaming file:', error); - throw error; - } - }); - } -} -export default FileRenamer; -//# sourceMappingURL=FileRenamer.js.map \ No newline at end of file diff --git a/script/js/class/FileRenamer.js.map b/script/js/class/FileRenamer.js.map deleted file mode 100644 index 60e28b48..00000000 --- a/script/js/class/FileRenamer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FileRenamer.js","sourceRoot":"","sources":["../../ts/class/FileRenamer.ts"],"names":[],"mappings":";AAqBA,OAAO,EAAE,MAAM,IAAI,CAAC;AAWnB,MAAM,WAAW;IAQP,UAAU,CAAC,OAAe,EAAE,UAAkB;;YACjD,IAAI,CAAC;gBACD,MAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;gBAC9C,OAAO,CAAC,GAAG,CAAC,qBAAqB,OAAO,OAAO,UAAU,EAAE,CAAC,CAAC;YACjE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;gBAC7C,MAAM,KAAK,CAAC;YAChB,CAAC;QACL,CAAC;KAAA;CAEJ;AAOD,eAAe,WAAW,CAAC"} \ No newline at end of file diff --git a/script/js/class/FontGenerator.js b/script/js/class/FontGenerator.js deleted file mode 100644 index d31fcda4..00000000 --- a/script/js/class/FontGenerator.js +++ /dev/null @@ -1,50 +0,0 @@ -import { __awaiter } from "tslib"; -import { generateFonts, FontAssetType, OtherAssetType } from 'fantasticon'; -class FontGenerator { - generateFonts(sourceDirectory, outputDiectory) { - return __awaiter(this, void 0, void 0, function* () { - const config = { - inputDir: sourceDirectory, - outputDir: outputDiectory, - name: 'icon.gl', - fontTypes: [ - FontAssetType.TTF, - FontAssetType.WOFF, - FontAssetType.WOFF2, - FontAssetType.EOT, - FontAssetType.SVG, - ], - assetTypes: [ - OtherAssetType.CSS, - OtherAssetType.SCSS, - OtherAssetType.SASS, - OtherAssetType.HTML, - OtherAssetType.JSON, - OtherAssetType.TS, - ], - formatOptions: { - json: { indent: 4 }, - }, - pathOptions: { - json: './dist/font/icon.gl.json', - css: './dist/font/icon.gl.css', - scss: './dist/font/icon.gl.scss', - woff: './dist/font/icon.gl.woff', - woff2: './dist/font/icon.gl.woff2', - }, - selector: '.igl', - prefix: 'igl', - fontsUrl: './fonts', - }; - try { - yield generateFonts(config); - console.log('Fonts generated successfully.'); - } - catch (error) { - console.error('Error generating fonts:', error); - } - }); - } -} -export default FontGenerator; -//# sourceMappingURL=FontGenerator.js.map \ No newline at end of file diff --git a/script/js/class/FontGenerator.js.map b/script/js/class/FontGenerator.js.map deleted file mode 100644 index d74cf2d0..00000000 --- a/script/js/class/FontGenerator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FontGenerator.js","sourceRoot":"","sources":["../../ts/class/FontGenerator.ts"],"names":[],"mappings":";AAqBA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAO3E,MAAM,aAAa;IAET,aAAa,CAAC,eAAuB,EAAE,cAAsB;;YAE/D,MAAM,MAAM,GAAG;gBAIX,QAAQ,EAAE,eAAe;gBACzB,SAAS,EAAE,cAAc;gBAGzB,IAAI,EAAE,SAAS;gBACf,SAAS,EAAE;oBACP,aAAa,CAAC,GAAG;oBACjB,aAAa,CAAC,IAAI;oBAClB,aAAa,CAAC,KAAK;oBACnB,aAAa,CAAC,GAAG;oBACjB,aAAa,CAAC,GAAG;iBACpB;gBACD,UAAU,EAAE;oBACR,cAAc,CAAC,GAAG;oBAClB,cAAc,CAAC,IAAI;oBACnB,cAAc,CAAC,IAAI;oBACnB,cAAc,CAAC,IAAI;oBACnB,cAAc,CAAC,IAAI;oBACnB,cAAc,CAAC,EAAE;iBACpB;gBAID,aAAa,EAAE;oBAOf,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;iBAalB;gBACL,WAAW,EAAE;oBACT,IAAI,EAAI,0BAA0B;oBAClC,GAAG,EAAK,yBAAyB;oBACjC,IAAI,EAAI,0BAA0B;oBAClC,IAAI,EAAI,0BAA0B;oBAClC,KAAK,EAAG,2BAA2B;iBACtC;gBAWD,QAAQ,EAAE,MAAM;gBAOhB,MAAM,EAAE,KAAK;gBACb,QAAQ,EAAE,SAAS;aAWlB,CAAC;YAEF,IAAI,CAAC;gBACD,MAAM,aAAa,CAAC,MAAM,CAAC,CAAC;gBAC5B,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;YACjD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;YACpD,CAAC;QACL,CAAC;KAAA;CACJ;AAOD,eAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/script/js/class/JavaScriptMinifier.js b/script/js/class/JavaScriptMinifier.js deleted file mode 100644 index 0552b734..00000000 --- a/script/js/class/JavaScriptMinifier.js +++ /dev/null @@ -1,28 +0,0 @@ -import { __awaiter } from "tslib"; -import { minify } from 'terser'; -import { promises as fs } from 'fs'; -class JavaScriptMinifier { - constructor(config) { - this.config = config; - } - minifyFile(inputPath, outputPath) { - return __awaiter(this, void 0, void 0, function* () { - try { - const inputCode = yield fs.readFile(inputPath, 'utf8'); - const result = yield minify(inputCode, this.config); - if (result.code) { - yield fs.writeFile(outputPath, result.code); - } - else { - throw new Error('Minification resulted in empty output.'); - } - } - catch (error) { - console.error(`Error minifying JavaScript file ${inputPath}:`, error); - throw error; - } - }); - } -} -export default JavaScriptMinifier; -//# sourceMappingURL=JavaScriptMinifier.js.map \ No newline at end of file diff --git a/script/js/class/JavaScriptMinifier.js.map b/script/js/class/JavaScriptMinifier.js.map deleted file mode 100644 index 8f54405e..00000000 --- a/script/js/class/JavaScriptMinifier.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"JavaScriptMinifier.js","sourceRoot":"","sources":["../../ts/class/JavaScriptMinifier.ts"],"names":[],"mappings":";AAqBA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AAUnC,MAAM,kBAAkB;IAQrB,YAAY,MAAW;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAQK,UAAU,CACZ,SAAiB,EACjB,UAAkB;;YAIlB,IAAI,CAAC;gBAED,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;gBAGvD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;gBAEpD,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;oBACd,MAAM,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;gBAChD,CAAC;qBAAM,CAAC;oBACJ,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;gBAC9D,CAAC;YACL,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,CAAC,mCAAmC,SAAS,GAAG,EAAE,KAAK,CAAC,CAAC;gBACtE,MAAM,KAAK,CAAC;YAChB,CAAC;QACL,CAAC;KAAA;CAEJ;AAOD,eAAe,kBAAkB,CAAC"} \ No newline at end of file diff --git a/script/js/class/PackageCreator.js b/script/js/class/PackageCreator.js deleted file mode 100644 index 8c2b3550..00000000 --- a/script/js/class/PackageCreator.js +++ /dev/null @@ -1,18 +0,0 @@ -import { __awaiter } from "tslib"; -import fs from 'fs'; -import path from 'path'; -class PackageCreator { - constructor(packageJson) { - this.packageJson = packageJson; - } - createPackageJson(outputDir) { - return __awaiter(this, void 0, void 0, function* () { - const filePath = path.join(outputDir, 'package.json'); - const data = JSON.stringify(this.packageJson, null, 2); - fs.writeFileSync(filePath, data, 'utf-8'); - console.log(`package.json created at ${filePath}`); - }); - } -} -export default PackageCreator; -//# sourceMappingURL=PackageCreator.js.map \ No newline at end of file diff --git a/script/js/class/PackageCreator.js.map b/script/js/class/PackageCreator.js.map deleted file mode 100644 index f3101af3..00000000 --- a/script/js/class/PackageCreator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PackageCreator.js","sourceRoot":"","sources":["../../ts/class/PackageCreator.ts"],"names":[],"mappings":";AAqBA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAWvB,MAAM,cAAc;IAQjB,YAAY,WAAwB;QAChC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACnC,CAAC;IAMK,iBAAiB,CAAC,SAAiB;;YACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;YACtD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YAEvD,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;YAC1C,OAAO,CAAC,GAAG,CAAC,2BAA2B,QAAQ,EAAE,CAAC,CAAC;QACvD,CAAC;KAAA;CAEJ;AAOD,eAAe,cAAc,CAAC"} \ No newline at end of file diff --git a/script/js/class/StyleProcessor.js b/script/js/class/StyleProcessor.js deleted file mode 100644 index ffe27dee..00000000 --- a/script/js/class/StyleProcessor.js +++ /dev/null @@ -1,31 +0,0 @@ -import { __awaiter } from "tslib"; -import * as sass from 'sass'; -import postcss from 'postcss'; -import fs from 'fs'; -import postcssConfigExpanded from '../config/postcss.config.expanded.js'; -import postcssConfigCompressed from '../config/postcss.config.compressed.js'; -class StyleProcessor { - processPostCSS(css, styleOption) { - return __awaiter(this, void 0, void 0, function* () { - const config = styleOption === 'expanded' ? postcssConfigExpanded : postcssConfigCompressed; - return postcss(config.plugins).process(css, { from: undefined, map: { inline: false } }); - }); - } - processStyles(inputFile, outputFile, styleOption) { - return __awaiter(this, void 0, void 0, function* () { - try { - const result = yield sass.compileAsync(inputFile, { style: styleOption }); - const processed = yield this.processPostCSS(result.css, styleOption); - fs.writeFileSync(outputFile, processed.css); - if (processed.map) { - fs.writeFileSync(`${outputFile}.map`, processed.map.toString()); - } - } - catch (err) { - console.error(`Error processing styles from ${inputFile}:`, err); - } - }); - } -} -export default StyleProcessor; -//# sourceMappingURL=StyleProcessor.js.map \ No newline at end of file diff --git a/script/js/class/StyleProcessor.js.map b/script/js/class/StyleProcessor.js.map deleted file mode 100644 index 143413b3..00000000 --- a/script/js/class/StyleProcessor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"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,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 deleted file mode 100644 index 99c8c6ab..00000000 --- a/script/js/class/SvgPackager.js +++ /dev/null @@ -1,87 +0,0 @@ -import { __awaiter } from "tslib"; -import * as fs from 'fs/promises'; -import * as path from 'path'; -import * as glob from 'glob'; -import SVGO from 'svgo'; -import { loadConfig } from 'svgo'; -class SvgPackager { - 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: ${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(svgContent); - const resultSvg = optimizedSvg.trim(); - 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.`); - } - catch (error) { - console.error('Error processing SVG files:', error); - throw error; - } - }); - } - readSvgFile(filePath) { - return __awaiter(this, void 0, void 0, function* () { - return fs.readFile(filePath, 'utf8'); - }); - } - sanitizeFileName(fileName) { - return fileName.replace(/[^a-zA-Z0-9_]/g, '_'); - } - writeFiles(iconName, svgContent, outputDirectory) { - return __awaiter(this, void 0, void 0, function* () { - yield this.writeSvgFile(iconName, svgContent, outputDirectory); - yield this.writeTypeScriptFile(iconName, svgContent, outputDirectory); - }); - } - optimizeSvg(svgContent) { - return __awaiter(this, void 0, void 0, function* () { - const config = yield loadConfig(this.svgoConfigPath); - const result = yield SVGO.optimize(svgContent, Object.assign({}, config)); - return result.data.trim(); - }); - } - writeTypeScriptFile(iconName, svgContent, outputDirectory) { - return __awaiter(this, void 0, void 0, function* () { - 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) { - return __awaiter(this, void 0, void 0, function* () { - try { - const jsonContent = JSON.stringify(iconNames, null, 2); - const outputPath = path.join(outputDirectory, 'icons.json'); - yield fs.writeFile(outputPath, jsonContent); - console.log('Icons JSON file created successfully'); - } - catch (error) { - console.error('Error writing icons JSON file:', error); - throw error; - } - }); - } -} -export default SvgPackager; -//# sourceMappingURL=SvgPackager.js.map \ No newline at end of file diff --git a/script/js/class/SvgPackager.js.map b/script/js/class/SvgPackager.js.map deleted file mode 100644 index b67a2a71..00000000 --- a/script/js/class/SvgPackager.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SvgPackager.js","sourceRoot":"","sources":["../../ts/class/SvgPackager.ts"],"names":[],"mappings":";AAqBA,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAYlC,MAAM,WAAW;IAMb,YAAoB,cAAsB;QAAtB,mBAAc,GAAd,cAAc,CAAQ;IAAG,CAAC;IAOjC,eAAe,CACxB,cAAsB,EACtB,eAAuB,EACvB,mBAA2B,EAC3B,qBAA6B;;YAG7B,MAAM,SAAS,GAAa,EAAE,CAAC;YAE/B,IAAI,CAAC;gBACD,OAAO,CAAC,GAAG,CAAC,yBAAyB,cAAc,EAAE,CAAC,CAAC;gBAEvD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,cAAc,WAAW,CAAC,CAAC;gBAEzD,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,EAAE,MAAM,CAAC,CAAC,CAAC;oBACpE,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;oBACzB,OAAO,CAAC,GAAG,CAAC,oBAAoB,QAAQ,EAAE,CAAC,CAAC;oBAC5C,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;oBAChD,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;oBAGxD,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,EAAE,CAAA;oBAErC,MAAM,IAAI,CAAC,YAAY,CAEnB,QAAQ,EACR,SAAS,EACT,eAAe,CAClB,CAAC;oBAEF,MAAM,IAAI,CAAC,mBAAmB,CAE1B,QAAQ,EACR,SAAS,EACT,mBAAmB,CACtB,CAAC;gBACN,CAAC;gBACD,MAAM,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;gBAC5D,OAAO,CAAC,GAAG,CAAC,0BAA0B,QAAQ,CAAC,MAAM,aAAa,CAAC,CAAC;YACxE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;gBACpD,MAAM,KAAK,CAAC;YAChB,CAAC;QACL,CAAC;KAAA;IA+Ca,WAAW,CAAC,QAAgB;;YACtC,OAAO,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACzC,CAAC;KAAA;IAUO,gBAAgB,CAAC,QAAgB;QACrC,OAAO,QAAQ,CAAC,OAAO,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC;IACnD,CAAC;IAEa,UAAU,CAAC,QAAgB,EAAE,UAAkB,EAAE,eAAuB;;YAClF,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC;YAC/D,MAAM,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC;QAC1E,CAAC;KAAA;IA6Ba,WAAW,CAAC,UAAkB;;YACxC,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YACrD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,oBAAO,MAAM,EAAG,CAAC;YAC9D,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QAC9B,CAAC;KAAA;IAuBa,mBAAmB,CAAC,QAAgB,EAAE,UAAkB,EAAE,eAAuB;;YAC3F,MAAM,SAAS,GAAG,qBAAqB,QAAQ,QAAQ,UAAU,OAAO,CAAC;YACzE,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,GAAG,QAAQ,KAAK,CAAC,CAAC;YAChE,MAAM,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QAC9C,CAAC;KAAA;IAuBa,YAAY,CAAC,QAAgB,EAAE,UAAkB,EAAE,eAAuB;;YACpF,MAAM,UAAU,GAAG,IAAI,CAAC,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/class/SvgSpriteGenerator.js b/script/js/class/SvgSpriteGenerator.js deleted file mode 100644 index 8df1864d..00000000 --- a/script/js/class/SvgSpriteGenerator.js +++ /dev/null @@ -1,41 +0,0 @@ -import { __awaiter } from "tslib"; -import svgSprite from 'svg-sprite'; -import fs from 'fs'; -import path from 'path'; -class SvgSpriteGenerator { - constructor(config) { - this.config = config; - } - generateSprite(sourceDir, outputDir) { - return __awaiter(this, void 0, void 0, function* () { - try { - const files = fs.readdirSync(sourceDir); - const sprite = new svgSprite(this.config); - files.forEach(file => { - if (path.extname(file) === '.svg') { - const svgPath = path.resolve(sourceDir, file); - const content = fs.readFileSync(svgPath, 'utf8'); - sprite.add(svgPath, null, content); - } - }); - sprite.compile((error, result) => { - if (error) { - throw error; - } - for (const mode in result) { - for (const resource in result[mode]) { - const outputPath = path.resolve(outputDir, result[mode][resource].path); - fs.mkdirSync(path.dirname(outputPath), { recursive: true }); - fs.writeFileSync(outputPath, result[mode][resource].contents); - } - } - }); - } - catch (err) { - console.error('Error generating SVG sprite:', err); - } - }); - } -} -export default SvgSpriteGenerator; -//# sourceMappingURL=SvgSpriteGenerator.js.map \ No newline at end of file diff --git a/script/js/class/SvgSpriteGenerator.js.map b/script/js/class/SvgSpriteGenerator.js.map deleted file mode 100644 index 26054536..00000000 --- a/script/js/class/SvgSpriteGenerator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SvgSpriteGenerator.js","sourceRoot":"","sources":["../../ts/class/SvgSpriteGenerator.ts"],"names":[],"mappings":";AAqBA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAUxB,MAAM,kBAAkB;IAQpB,YAAY,MAAW;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAOK,cAAc,CAAC,SAAiB,EAAE,SAAiB;;YACrD,IAAI,CAAC;gBACD,MAAM,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;gBACxC,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAE1C,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;oBACjB,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,MAAM,EAAE,CAAC;wBAChC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;wBAC9C,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;wBACjD,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;oBACvC,CAAC;gBACL,CAAC,CAAC,CAAC;gBAEH,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;oBAC7B,IAAI,KAAK,EAAE,CAAC;wBACR,MAAM,KAAK,CAAC;oBAChB,CAAC;oBAED,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;wBACxB,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;4BAClC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAC3B,SAAS,EACT,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAC9B,CAAC;4BACF,EAAE,CAAC,SAAS,CACR,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EACxB,EAAE,SAAS,EAAE,IAAI,EAAE,CACtB,CAAC;4BACF,EAAE,CAAC,aAAa,CACZ,UAAU,EACV,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAClC,CAAC;wBACN,CAAC;oBACL,CAAC;gBACL,CAAC,CAAC,CAAC;YAEP,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACX,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,GAAG,CAAC,CAAC;YACvD,CAAC;QACL,CAAC;KAAA;CACJ;AAOD,eAAe,kBAAkB,CAAC"} \ No newline at end of file diff --git a/script/js/class/TypeScriptCompiler.js b/script/js/class/TypeScriptCompiler.js deleted file mode 100644 index 46fb6167..00000000 --- a/script/js/class/TypeScriptCompiler.js +++ /dev/null @@ -1,36 +0,0 @@ -import ts from 'typescript'; -class TypeScriptCompiler { - constructor(config) { - this.config = config; - } - compile(filePaths, outDir) { - return new Promise((resolve, reject) => { - const options = Object.assign({ module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2015, outDir }, this.config); - const host = ts.createCompilerHost(options); - const program = ts.createProgram(filePaths, options, host); - const emitResult = program.emit(); - const allDiagnostics = ts.getPreEmitDiagnostics(program).concat(emitResult.diagnostics); - allDiagnostics.forEach(diagnostic => { - if (diagnostic.file) { - const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start); - const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); - console.error(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`); - } - else { - console.error(ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n')); - } - }); - const exitCode = emitResult.emitSkipped ? 1 : 0; - if (exitCode === 0) { - console.log('Compilation completed successfully.'); - resolve(); - } - else { - console.error('Compilation failed.'); - reject(new Error('TypeScript compilation failed')); - } - }); - } -} -export default TypeScriptCompiler; -//# sourceMappingURL=TypeScriptCompiler.js.map \ No newline at end of file diff --git a/script/js/class/TypeScriptCompiler.js.map b/script/js/class/TypeScriptCompiler.js.map deleted file mode 100644 index 8e3a5417..00000000 --- a/script/js/class/TypeScriptCompiler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TypeScriptCompiler.js","sourceRoot":"","sources":["../../ts/class/TypeScriptCompiler.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,MAAM,YAAY,CAAC;AAU3B,MAAM,kBAAkB;IAQrB,YAAY,MAAW;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAcD,OAAO,CACH,SAAmB,EACnB,MAAc;QAGd,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAGnC,MAAM,OAAO,mBACT,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,EAC9B,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,EAC9B,MAAM,IAEH,IAAI,CAAC,MAAM,CACjB,CAAC;YAGF,MAAM,IAAI,GAAG,EAAE,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;YAG5C,MAAM,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;YAG3D,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;YAGlC,MAAM,cAAc,GAAG,EAAE,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;YACxF,cAAc,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;gBAEhC,IAAI,UAAU,CAAC,IAAI,EAAE,CAAC;oBAClB,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC,IAAI,CAAC,6BAA6B,CAAC,UAAU,CAAC,KAAM,CAAC,CAAC;oBAC7F,MAAM,OAAO,GAAG,EAAE,CAAC,4BAA4B,CAAC,UAAU,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;oBAC9E,OAAO,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,GAAG,CAAC,IAAI,SAAS,GAAG,CAAC,MAAM,OAAO,EAAE,CAAC,CAAC;gBAC5F,CAAC;qBAAM,CAAC;oBACJ,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAAC,UAAU,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC;gBACjF,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,MAAM,QAAQ,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAChD,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;gBACjB,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;gBACnD,OAAO,EAAE,CAAC;YACd,CAAC;iBAAM,CAAC;gBACJ,OAAO,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;gBACrC,MAAM,CAAC,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC,CAAC;YACvD,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAOD,eAAe,kBAAkB,CAAC"} \ No newline at end of file diff --git a/script/js/class/VersionWriter.js b/script/js/class/VersionWriter.js deleted file mode 100644 index 90b1eb2b..00000000 --- a/script/js/class/VersionWriter.js +++ /dev/null @@ -1,17 +0,0 @@ -import { __awaiter } from "tslib"; -import { promises as fs } from 'fs'; -class VersionWriter { - writeVersionToFile(filePath, version) { - return __awaiter(this, void 0, void 0, function* () { - try { - yield fs.writeFile(filePath, version, 'utf8'); - console.log(`Version ${version} written to ${filePath}`); - } - catch (error) { - console.error(`Error writing version to file: ${error}`); - } - }); - } -} -export default VersionWriter; -//# sourceMappingURL=VersionWriter.js.map \ No newline at end of file diff --git a/script/js/class/VersionWriter.js.map b/script/js/class/VersionWriter.js.map deleted file mode 100644 index e2a52705..00000000 --- a/script/js/class/VersionWriter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"VersionWriter.js","sourceRoot":"","sources":["../../ts/class/VersionWriter.ts"],"names":[],"mappings":";AAqBA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AAUnC,MAAM,aAAa;IAOV,kBAAkB,CACpB,QAAgB,EAChB,OAAe;;YAEf,IAAI,CAAC;gBACD,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;gBAC9C,OAAO,CAAC,GAAG,CAAC,WAAW,OAAO,eAAe,QAAQ,EAAE,CAAC,CAAC;YAC7D,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,CAAC,kCAAkC,KAAK,EAAE,CAAC,CAAC;YAC7D,CAAC;QACL,CAAC;KAAA;CACJ;AAOD,eAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/script/js/config/config.js b/script/js/config/config.js deleted file mode 100644 index 3ecc01f5..00000000 --- a/script/js/config/config.js +++ /dev/null @@ -1,21 +0,0 @@ -export const CONFIG = { - path: { - src: './src', - dist: './dist', - svg_input: './src/svg', - svg_output: './dist/svg', - sprite_input: './dist/svg', - sprite_output: './dist/sprite', - font_input: './dist/svg', - font_output: './dist/font', - scss_input: './src/scss', - scss_output: './dist/scss', - css_output: './dist/css', - json_output: './dist', - ts_input: './src/ts', - ts_output: './dist/ts', - ts_output_icons: './src/ts/icons', - js_output: './dist/js', - }, -}; -//# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/script/js/config/config.js.map b/script/js/config/config.js.map deleted file mode 100644 index 9cd99498..00000000 --- a/script/js/config/config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"config.js","sourceRoot":"","sources":["../../ts/config/config.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,IAAI,EAAE;QACF,GAAG,EAAO,OAAO;QACjB,IAAI,EAAO,QAAQ;QAEnB,SAAS,EAAW,WAAW;QAC/B,UAAU,EAAU,YAAY;QAChC,YAAY,EAAQ,YAAY;QAChC,aAAa,EAAO,eAAe;QACnC,UAAU,EAAU,YAAY;QAChC,WAAW,EAAS,aAAa;QACjC,UAAU,EAAU,YAAY;QAChC,WAAW,EAAS,aAAa;QACjC,UAAU,EAAU,YAAY;QAChC,WAAW,EAAS,QAAQ;QAC5B,QAAQ,EAAY,UAAU;QAC9B,SAAS,EAAW,WAAW;QAC/B,eAAe,EAAK,gBAAgB;QACpC,SAAS,EAAW,WAAW;KAElC;CAEJ,CAAC"} \ No newline at end of file diff --git a/script/js/config/fantasticon.config.js b/script/js/config/fantasticon.config.js deleted file mode 100644 index 797f36f4..00000000 --- a/script/js/config/fantasticon.config.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=fantasticon.config.js.map \ No newline at end of file diff --git a/script/js/config/fantasticon.config.js.map b/script/js/config/fantasticon.config.js.map deleted file mode 100644 index d8344995..00000000 --- a/script/js/config/fantasticon.config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fantasticon.config.js","sourceRoot":"","sources":["../../ts/config/fantasticon.config.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/script/js/config/package.config.js b/script/js/config/package.config.js deleted file mode 100644 index 2195d447..00000000 --- a/script/js/config/package.config.js +++ /dev/null @@ -1,22 +0,0 @@ -import * as pack_object from '../../../package.json' assert { type: 'json' }; -const pack = JSON.parse(JSON.stringify(pack_object)).default; -const packageConfig = { - name: pack.name, - version: pack.version, - description: pack.description, - keywords: pack.keywords, - license: pack.license, - homepage: pack.homepage, - main: 'index.js', - files: [ - "svg/**/*.{svg}", - "js/**/*.{js,map}", - "ts/**/*.ts", - "css/**/*.{css,map}", - "scss/**/*.{scss}", - "font/**/*.{eot,otf,ttf,woff,woff2}", - "!.DS_Store" - ], -}; -export default packageConfig; -//# sourceMappingURL=package.config.js.map \ No newline at end of file diff --git a/script/js/config/package.config.js.map b/script/js/config/package.config.js.map deleted file mode 100644 index d9ab612e..00000000 --- a/script/js/config/package.config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"package.config.js","sourceRoot":"","sources":["../../ts/config/package.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,uBAAuB,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC;AAE7E,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC;AAG7D,MAAM,aAAa,GAAG;IAClB,IAAI,EAAE,IAAI,CAAC,IAAI;IACf,OAAO,EAAE,IAAI,CAAC,OAAO;IACrB,WAAW,EAAE,IAAI,CAAC,WAAW;IAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ;IACvB,OAAO,EAAE,IAAI,CAAC,OAAO;IACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;IACvB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE;QACH,gBAAgB;QAChB,kBAAkB;QAClB,YAAY;QACZ,oBAAoB;QACpB,kBAAkB;QAClB,oCAAoC;QACpC,YAAY;KACf;CA2BJ,CAAA;AAMD,eAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/script/js/config/postcss.config.compressed.js b/script/js/config/postcss.config.compressed.js deleted file mode 100644 index 9f192127..00000000 --- a/script/js/config/postcss.config.compressed.js +++ /dev/null @@ -1,12 +0,0 @@ -import autoprefixer from 'autoprefixer'; -import cssnano from 'cssnano'; -const postcssConfigCompressed = { - plugins: [ - autoprefixer, - cssnano({ - preset: 'default' - }), - ] -}; -export default postcssConfigCompressed; -//# sourceMappingURL=postcss.config.compressed.js.map \ No newline at end of file diff --git a/script/js/config/postcss.config.compressed.js.map b/script/js/config/postcss.config.compressed.js.map deleted file mode 100644 index b8b0de21..00000000 --- a/script/js/config/postcss.config.compressed.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"postcss.config.compressed.js","sourceRoot":"","sources":["../../ts/config/postcss.config.compressed.ts"],"names":[],"mappings":"AAqBA,OAAO,YAAY,MAAM,cAAc,CAAC;AACxC,OAAO,OAAO,MAAM,SAAS,CAAC;AAO9B,MAAM,uBAAuB,GAAG;IAC5B,OAAO,EAAE;QACL,YAAY;QAEZ,OAAO,CACH;YACI,MAAM,EAAE,SAAS;SACpB,CACJ;KACJ;CACJ,CAAC;AAOF,eAAe,uBAAuB,CAAC"} \ No newline at end of file diff --git a/script/js/config/postcss.config.expanded.js b/script/js/config/postcss.config.expanded.js deleted file mode 100644 index 4c8bf207..00000000 --- a/script/js/config/postcss.config.expanded.js +++ /dev/null @@ -1,8 +0,0 @@ -import autoprefixer from 'autoprefixer'; -const postcssConfigExpanded = { - plugins: [ - autoprefixer, - ] -}; -export default postcssConfigExpanded; -//# sourceMappingURL=postcss.config.expanded.js.map \ No newline at end of file diff --git a/script/js/config/postcss.config.expanded.js.map b/script/js/config/postcss.config.expanded.js.map deleted file mode 100644 index c8316e68..00000000 --- a/script/js/config/postcss.config.expanded.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"postcss.config.expanded.js","sourceRoot":"","sources":["../../ts/config/postcss.config.expanded.ts"],"names":[],"mappings":"AAqBA,OAAO,YAAY,MAAM,cAAc,CAAC;AAQxC,MAAM,qBAAqB,GAAG;IAC1B,OAAO,EAAE;QACL,YAAY;KAEf;CACJ,CAAC;AAOF,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/script/js/config/svgo.config.js b/script/js/config/svgo.config.js deleted file mode 100644 index d5aee4f7..00000000 --- a/script/js/config/svgo.config.js +++ /dev/null @@ -1,71 +0,0 @@ -import path from 'node:path'; -const svgoConfig = { - multipass: true, - js2svg: { - pretty: true, - indent: 2, - eol: 'lf' - }, - plugins: [ - { - name: 'preset-default', - params: { - overrides: { - removeUnknownsAndDefaults: { - keepDataAttrs: false, - keepRoleAttr: true, - }, - removeViewBox: false, - inlineStyles: { - onlyMatchedOnce: false, - } - } - } - }, - 'cleanupListOfValues', - { - name: 'removeAttrs', - params: { - attrs: [ - 'clip-rule', - 'fill' - ] - } - }, - { - name: 'explicitAttrs', - type: 'visitor', - params: { - attributes: { - xmlns: 'http://www.w3.org/2000/svg', - width: '16', - height: '16', - fill: 'currentColor', - class: '', - viewBox: '0 0 16 16' - } - }, - fn(_root, params, info) { - if (!params.attributes) { - return null; - } - const pathname = info.path; - const basename = path.basename(pathname, '.svg'); - return { - element: { - enter(node, parentNode) { - if (node.name === 'svg' && parentNode.type === 'root') { - node.attributes = {}; - for (const [key, value] of Object.entries(params.attributes)) { - node.attributes[key] = key === 'class' ? `igl igl-${basename}` : value; - } - } - } - } - }; - } - } - ] -}; -export default svgoConfig; -//# sourceMappingURL=svgo.config.js.map \ No newline at end of file diff --git a/script/js/config/svgo.config.js.map b/script/js/config/svgo.config.js.map deleted file mode 100644 index 8651d5b3..00000000 --- a/script/js/config/svgo.config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"svgo.config.js","sourceRoot":"","sources":["../../ts/config/svgo.config.ts"],"names":[],"mappings":"AAqBA,OAAO,IAAI,MAAM,WAAW,CAAA;AAO5B,MAAM,UAAU,GAAG;IACf,SAAS,EAAE,IAAI;IACf,MAAM,EAAE;QACJ,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,CAAC;QACT,GAAG,EAAE,IAAI;KACZ;IACD,OAAO,EAAE;QACL;YACI,IAAI,EAAE,gBAAgB;YACtB,MAAM,EAAE;gBACJ,SAAS,EAAE;oBACP,yBAAyB,EAAE;wBAEvB,aAAa,EAAE,KAAK;wBAEpB,YAAY,EAAE,IAAI;qBACrB;oBAGD,aAAa,EAAE,KAAK;oBAGpB,YAAY,EAAE;wBACV,eAAe,EAAE,KAAK;qBACzB;iBACJ;aACJ;SACJ;QAGD,qBAAqB;QACrB;YACI,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE;gBACJ,KAAK,EAAE;oBACH,WAAW;oBACX,MAAM;iBACT;aACJ;SACJ;QAED;YACI,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,SAAS;YACf,MAAM,EAAE;gBACJ,UAAU,EAAE;oBACR,KAAK,EAAE,4BAA4B;oBACnC,KAAK,EAAE,IAAI;oBACX,MAAM,EAAE,IAAI;oBACZ,IAAI,EAAE,cAAc;oBACpB,KAAK,EAAE,EAAE;oBACT,OAAO,EAAE,WAAW;iBACvB;aACJ;YACD,EAAE,CAAC,KAAU,EAAE,MAAuE,EAAE,IAAuB;gBAC3G,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;oBACrB,OAAO,IAAI,CAAA;gBACf,CAAC;gBACD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAA;gBAC1B,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;gBAEhD,OAAO;oBACH,OAAO,EAAE;wBACL,KAAK,CAAC,IAA8D,EAAE,UAA6B;4BAC/F,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,IAAI,UAAU,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;gCAGpD,IAAI,CAAC,UAAU,GAAG,EAAE,CAAA;gCACpB,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;oCAC3D,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,GAAG,KAAK,OAAO,CAAC,CAAC,CAAC,WAAW,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,CAAA;gCAC1E,CAAC;4BACL,CAAC;wBACL,CAAC;qBACJ;iBACJ,CAAA;YACL,CAAC;SACJ;KACJ;CACJ,CAAC;AAOF,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/script/js/config/svgsprite.config.js b/script/js/config/svgsprite.config.js deleted file mode 100644 index d876975c..00000000 --- a/script/js/config/svgsprite.config.js +++ /dev/null @@ -1,44 +0,0 @@ -const svgspriteConfig = { - dest: './dist/sprite', - shape: { - id: { - separator: '--', - generator: 'icon-%s', - pseudo: '~' - }, - dimension: { - maxWidth: 2000, - maxHeight: 2000, - precision: 2, - attributes: false, - }, - spacing: { - padding: 0, - box: 'content' - }, - transform: ['svgo'], - }, - svg: { - xmlDeclaration: false, - doctypeDeclaration: true, - namespaceIDs: true, - namespaceClassnames: false, - dimensionAttributes: true - }, - variables: {}, - mode: { - css: { - render: { - css: true - } - }, - view: true, - defs: true, - symbol: { - sprite: "icon.gl.svg" - }, - stack: true, - } -}; -export default svgspriteConfig; -//# sourceMappingURL=svgsprite.config.js.map \ No newline at end of file diff --git a/script/js/config/svgsprite.config.js.map b/script/js/config/svgsprite.config.js.map deleted file mode 100644 index 2bc47f91..00000000 --- a/script/js/config/svgsprite.config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"svgsprite.config.js","sourceRoot":"","sources":["../../ts/config/svgsprite.config.ts"],"names":[],"mappings":"AA4BA,MAAM,eAAe,GAAqB;IACtC,IAAI,EAAE,eAAe;IAErB,KAAK,EAAE;QACH,EAAE,EAAE;YACA,SAAS,EAAE,IAAI;YACf,SAAS,EAAE,SAAS;YAEpB,MAAM,EAAE,GAAG;SACd;QACD,SAAS,EAAE;YACP,QAAQ,EAAE,IAAI;YACd,SAAS,EAAE,IAAI;YACf,SAAS,EAAE,CAAC;YACZ,UAAU,EAAE,KAAK;SACpB;QACD,OAAO,EAAE;YACL,OAAO,EAAE,CAAC;YACV,GAAG,EAAE,SAAS;SACjB;QACD,SAAS,EAAE,CAAC,MAAM,CAAC;KAItB;IACD,GAAG,EAAE;QACD,cAAc,EAAE,KAAK;QAErB,kBAAkB,EAAE,IAAI;QACxB,YAAY,EAAE,IAAI;QAGlB,mBAAmB,EAAE,KAAK;QAC1B,mBAAmB,EAAE,IAAI;KAC5B;IACD,SAAS,EAAE,EAAE;IACb,IAAI,EAAE;QACF,GAAG,EAAE;YACD,MAAM,EAAE;gBACJ,GAAG,EAAE,IAAI;aACZ;SACJ;QACD,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,IAAI;QAEV,MAAM,EAAE;YAGJ,MAAM,EAAE,aAAa;SACxB;QACD,KAAK,EAAE,IAAI;KAGd;CACJ,CAAC;AAOF,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/script/js/config/terser.config.js b/script/js/config/terser.config.js deleted file mode 100644 index 56e02175..00000000 --- a/script/js/config/terser.config.js +++ /dev/null @@ -1,19 +0,0 @@ -const terserCofig = { - compress: { - drop_console: true, - drop_debugger: true, - pure_funcs: ['console.info', 'console.debug', 'console.warn'], - }, - mangle: { - properties: true, - }, - format: { - comments: false, - beautify: false, - }, - keep_classnames: false, - keep_fnames: false, - toplevel: true, -}; -export default terserCofig; -//# sourceMappingURL=terser.config.js.map \ No newline at end of file diff --git a/script/js/config/terser.config.js.map b/script/js/config/terser.config.js.map deleted file mode 100644 index 43b90341..00000000 --- a/script/js/config/terser.config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"terser.config.js","sourceRoot":"","sources":["../../ts/config/terser.config.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,GAAG;IAChB,QAAQ,EAAE;QACN,YAAY,EAAE,IAAI;QAClB,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,CAAC,cAAc,EAAE,eAAe,EAAE,cAAc,CAAC;KAChE;IACD,MAAM,EAAE;QAEJ,UAAU,EAAE,IAAI;KACnB;IACD,MAAM,EAAE;QACJ,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;KAClB;IACD,eAAe,EAAE,KAAK;IACtB,WAAW,EAAE,KAAK;IAClB,QAAQ,EAAE,IAAI;CACjB,CAAC;AAOF,eAAe,WAAW,CAAC"} \ No newline at end of file diff --git a/script/js/config/ts.config.js b/script/js/config/ts.config.js deleted file mode 100644 index 35a96a88..00000000 --- a/script/js/config/ts.config.js +++ /dev/null @@ -1,3 +0,0 @@ -const tsConfig = {}; -export default tsConfig; -//# sourceMappingURL=ts.config.js.map \ No newline at end of file diff --git a/script/js/config/ts.config.js.map b/script/js/config/ts.config.js.map deleted file mode 100644 index 8c434103..00000000 --- a/script/js/config/ts.config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ts.config.js","sourceRoot":"","sources":["../../ts/config/ts.config.ts"],"names":[],"mappings":"AAGA,MAAM,QAAQ,GAAG,EAyGhB,CAAC;AAOF,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/script/js/interfaces/File.js b/script/js/interfaces/File.js deleted file mode 100644 index 7da5bc07..00000000 --- a/script/js/interfaces/File.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -//# sourceMappingURL=File.js.map \ No newline at end of file diff --git a/script/js/interfaces/File.js.map b/script/js/interfaces/File.js.map deleted file mode 100644 index 861a8ab5..00000000 --- a/script/js/interfaces/File.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"File.js","sourceRoot":"","sources":["../../ts/interfaces/File.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/script/js/interfaces/PackageJson.js b/script/js/interfaces/PackageJson.js deleted file mode 100644 index 4f3242ce..00000000 --- a/script/js/interfaces/PackageJson.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -//# sourceMappingURL=PackageJson.js.map \ No newline at end of file diff --git a/script/js/interfaces/PackageJson.js.map b/script/js/interfaces/PackageJson.js.map deleted file mode 100644 index 8ba9bed3..00000000 --- a/script/js/interfaces/PackageJson.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PackageJson.js","sourceRoot":"","sources":["../../ts/interfaces/PackageJson.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/script/js/interfaces/SVG.js b/script/js/interfaces/SVG.js deleted file mode 100644 index e8b1633f..00000000 --- a/script/js/interfaces/SVG.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -//# sourceMappingURL=SVG.js.map \ No newline at end of file diff --git a/script/js/interfaces/SVG.js.map b/script/js/interfaces/SVG.js.map deleted file mode 100644 index 2bb813f8..00000000 --- a/script/js/interfaces/SVG.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SVG.js","sourceRoot":"","sources":["../../ts/interfaces/SVG.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/script/ts/class/DirectoryCleaner.ts b/script/ts/class/DirectoryCleaner.ts deleted file mode 100644 index 02580d32..00000000 --- a/script/ts/class/DirectoryCleaner.ts +++ /dev/null @@ -1,58 +0,0 @@ -// script/class/class/DirectoryCleaner.ts - -// Copyright 2023 Scape Agency BV - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -// ============================================================================ -// Import -// ============================================================================ - -import fs from 'fs'; -import path from 'path'; - - -// ============================================================================ -// Classes -// ============================================================================ - -class DirectoryCleaner { - - /** - * Recursively deletes all contents of the directory. - * @param dirPath The path to the directory to clean. - */ - public cleanDirectory(dirPath: string): void { - if (fs.existsSync(dirPath)) { - fs.readdirSync(dirPath).forEach(file => { - const curPath = path.join(dirPath, file); - - if (fs.lstatSync(curPath).isDirectory()) { // Recurse - this.cleanDirectory(curPath); - } else { // Delete file - fs.unlinkSync(curPath); - } - }); - - fs.rmdirSync(dirPath); - } - } -} - - -// ============================================================================ -// Export -// ============================================================================ - -export default DirectoryCleaner; diff --git a/script/ts/class/DirectoryCopier.ts b/script/ts/class/DirectoryCopier.ts deleted file mode 100644 index 4d1cf39c..00000000 --- a/script/ts/class/DirectoryCopier.ts +++ /dev/null @@ -1,77 +0,0 @@ -// script/class/class/DirectoryCopier.ts - -// Copyright 2023 Scape Agency BV - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -// ============================================================================ -// Import -// ============================================================================ - -import fs from 'fs'; -import path from 'path'; - - -// ============================================================================ -// Classes -// ============================================================================ - -/** - * A class for copying files from one directory to another. - */ -class DirectoryCopier { - - /** - * Copies all files from a source directory to a destination directory. - * @param {string} srcDir - The source directory path. - * @param {string} destDir - The destination directory path. - * @description This method iterates over all files in the source directory - * and copies each file to the destination directory. It resolves - * the absolute paths of the source and destination directories to - * handle relative paths correctly. This is useful for duplicating - * files or setting up similar directory structures in different locations. - * @throws Will throw an error if copying fails for any file. - */ - async copyFiles(srcDir: string, destDir: string): Promise { - try { - const resolvedSrcDir = path.resolve(srcDir); - const resolvedDestDir = path.resolve(destDir); - - const files = fs.readdirSync(resolvedSrcDir); - console.log("FILES:", files); - - files.forEach(file => { - const srcFile = path.join(resolvedSrcDir, file); - const destFile = path.join(resolvedDestDir, file); - - if (fs.statSync(srcFile).isFile()) { - console.log("Copying file:", srcFile); - fs.copyFileSync(srcFile, destFile); - } - }); - - console.log(`Files copied from ${resolvedSrcDir} to ${resolvedDestDir}`); - } catch (error) { - console.error('Error copying files:', error); - throw error; - } - } -} - - -// ============================================================================ -// Export -// ============================================================================ - -export default DirectoryCopier; diff --git a/script/ts/class/DirectoryCreator.ts b/script/ts/class/DirectoryCreator.ts deleted file mode 100644 index 16adcef0..00000000 --- a/script/ts/class/DirectoryCreator.ts +++ /dev/null @@ -1,64 +0,0 @@ -// script/class/DirectoryGenerator.ts - -// Copyright 2023 Scape Agency BV - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -// ============================================================================ -// Import -// ============================================================================ - -import fs from 'fs'; -import path from 'path'; - - -// ============================================================================ -// Classes -// ============================================================================ - -/** - * A class for creating directories. - */ - class DirectoryCreator { - - /** - * Creates directories at the specified locations. - * @param {string} basePath - The base path where directories will be created. - * @param {string[]} directories - An array of directory paths to create. - * @description This method iterates over the provided array of directory paths, - * creating each directory at the specified location within the base path. - * If a directory already exists, it skips creation. This is useful for - * setting up a project structure or ensuring necessary directories are - * available before performing file operations. - * @throws Will throw an error if directory creation fails. - */ - async createDirectories(basePath: string, directories: string[]): Promise { - directories.forEach(dir => { - const dirPath = path.join(basePath, dir); - if (!fs.existsSync(dirPath)) { - fs.mkdirSync(dirPath, { recursive: true }); - console.log(`Directory created: ${dirPath}`); - } else { - console.log(`Directory already exists: ${dirPath}`); - } - }); - } -} - - -// ============================================================================ -// Export -// ============================================================================ - -export default DirectoryCreator; \ No newline at end of file diff --git a/script/ts/class/FileCopier.ts b/script/ts/class/FileCopier.ts deleted file mode 100644 index 42a225e9..00000000 --- a/script/ts/class/FileCopier.ts +++ /dev/null @@ -1,63 +0,0 @@ -// script/class/class/FileCopier.ts - -// Copyright 2023 Scape Agency BV - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -// ============================================================================ -// Import -// ============================================================================ - -import fs from 'fs'; -import path from 'path'; - - -// ============================================================================ -// Classes -// ============================================================================ - -/** - * A class for copying files from one location to another. - */ - class FileCopier { - - /** - * Copies a single file to a specified destination directory. - * @param {string} srcFile - The path of the source file to copy. - * @param {string} destDir - The destination directory where the file should be copied. - * @throws Will throw an error if the file copy operation fails. - */ - async copyFileToDirectory( - srcFile: string, - destDir: string - ): Promise { - try { - const fileName = path.basename(srcFile); - const destFilePath = path.join(destDir, fileName); - await fs.promises.copyFile(srcFile, destFilePath); - console.log(`File copied from ${srcFile} to ${destFilePath}`); - } catch (error) { - console.error('Error copying file:', error); - throw error; - } - } - -} - - -// ============================================================================ -// Export -// ============================================================================ - -export default FileCopier; diff --git a/script/ts/class/FileRenamer.ts b/script/ts/class/FileRenamer.ts deleted file mode 100644 index 49dc0cd6..00000000 --- a/script/ts/class/FileRenamer.ts +++ /dev/null @@ -1,58 +0,0 @@ -// script/class/class/FileRenamer.ts - -// Copyright 2023 Scape Agency BV - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -// ============================================================================ -// Import -// ============================================================================ - -import fs from 'fs'; -import path from 'path'; - - -// ============================================================================ -// Classes -// ============================================================================ - -/** - * A class for renaming files. - */ - class FileRenamer { - - /** - * Renames a file from the source path to the target path. - * @param srcPath The current path of the file. - * @param targetPath The new path of the file after renaming. - * @returns Promise - */ - async renameFile(srcPath: string, targetPath: string): Promise { - try { - await fs.promises.rename(srcPath, targetPath); - console.log(`File renamed from ${srcPath} to ${targetPath}`); - } catch (error) { - console.error('Error renaming file:', error); - throw error; - } - } - -} - - -// ============================================================================ -// Export -// ============================================================================ - -export default FileRenamer; diff --git a/script/ts/class/FontGenerator.ts b/script/ts/class/FontGenerator.ts deleted file mode 100644 index f43d3bea..00000000 --- a/script/ts/class/FontGenerator.ts +++ /dev/null @@ -1,133 +0,0 @@ -// script/class/FontGenerator.ts - -// Copyright 2023 Scape Agency BV - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -// ============================================================================ -// Import -// ============================================================================ - -import { generateFonts, FontAssetType, OtherAssetType } from 'fantasticon'; - - -// ============================================================================ -// Classes -// ============================================================================ - -class FontGenerator { - - async generateFonts(sourceDirectory: string, outputDiectory: string) { - - const config = { - - - // RunnerMandatoryOptions - inputDir: sourceDirectory, // (required) - outputDir: outputDiectory, // (required) - - // RunnerOptionalOptions - name: 'icon.gl', - fontTypes: [ - FontAssetType.TTF, // TTF = "ttf" - FontAssetType.WOFF, // WOFF = "woff" - FontAssetType.WOFF2, // WOFF2 = "woff2" - FontAssetType.EOT, // EOT = "eot" - FontAssetType.SVG, // SVG = "svg" - ], - assetTypes: [ - OtherAssetType.CSS, // CSS = "css", - OtherAssetType.SCSS, // SCSS = "scss", - OtherAssetType.SASS, // SASS = "sass", - OtherAssetType.HTML, // HTML = "html", - OtherAssetType.JSON, // JSON = "json", - OtherAssetType.TS, // TS = "ts" - ], - - - - formatOptions: { - // woff: { - // // Woff Extended Metadata Block - see https://www.w3.org/TR/WOFF/#Metadata - // metadata: '...' - // }, - // ttf?: TtfOptions; // type TtfOptions = svg2ttf.FontOptions; - // svg?: SvgOptions; // type SvgOptions = Omit; - json: { indent: 4 } , - // ts: { - // // select what kind of types you want to generate - // // (default `['enum', 'constant', 'literalId', 'literalKey']`) - // types: ['enum', 'constant', 'literalId', 'literalKey'], - // // render the types with `'` instead of `"` (default is `"`) - // singleQuotes: false, - // // customise names used for the generated types and constants - // enumName: 'icon_gl', - // constantName: 'MY_CODEPOINTS' - // // literalIdName: 'IconId', - // // literalKeyName: 'IconKey' - // } - }, - pathOptions: { - json: './dist/font/icon.gl.json', - css: './dist/font/icon.gl.css', - scss: './dist/font/icon.gl.scss', - woff: './dist/font/icon.gl.woff', - woff2: './dist/font/icon.gl.woff2', - }, - // codepoints: { - // 'chevron-left': 57344, // decimal representation of 0xe000 - // 'chevron-right': 57345, - // 'thumbs-up': 57358, - // 'thumbs-down': 57359, - // }, - // fontHeight: number; - // descent: number; - // normalize: boolean; - // round: number; - selector: '.igl', - // tag: string; - // Use our custom Handlebars templates - // templates: { - // css: './build/font/icon.gl.css.hbs', - // scss: './build/font/icon.gl.scss.hbs' - // }, - prefix: 'igl', - fontsUrl: './fonts', - - // Customize generated icon IDs (unavailable with `.json` config file) - // getIconId: ({ - // basename, // `string` - Example: 'foo'; - // relativeDirPath, // `string` - Example: 'sub/dir/foo.svg' - // absoluteFilePath, // `string` - Example: '/var/icons/sub/dir/foo.svg' - // relativeFilePath, // `string` - Example: 'foo.svg' - // index // `number` - Example: `0` - // }) => [index, basename].join('_') // '0_foo' - - }; - - try { - await generateFonts(config); - console.log('Fonts generated successfully.'); - } catch (error) { - console.error('Error generating fonts:', error); - } - } -} - - -// ============================================================================ -// Export -// ============================================================================ - -export default FontGenerator; diff --git a/script/ts/class/JavaScriptMinifier.ts b/script/ts/class/JavaScriptMinifier.ts deleted file mode 100644 index 0d69ca2f..00000000 --- a/script/ts/class/JavaScriptMinifier.ts +++ /dev/null @@ -1,82 +0,0 @@ -// script/class/class/JavaScriptMinifier.ts - -// Copyright 2023 Scape Agency BV - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -// ============================================================================ -// Import -// ============================================================================ - -import { minify } from 'terser'; -import { promises as fs } from 'fs'; - - -// ============================================================================ -// Classes -// ============================================================================ - -/** - * Class to minify JavaScript files using Terser. - */ - class JavaScriptMinifier { - - private config: any; - - /** - * Constructs an instance with the provided configuration. - * @param {any} config - Configuration object - minification options for Terser. - */ - constructor(config: any) { - this.config = config; - } - - /** - * Minifies a JavaScript file. - * @param {string} inputPath - Path to the input JavaScript file. - * @param {string} outputPath - Path to save the minified output file. - * @returns {Promise} - A promise that resolves when minification is complete. - */ - async minifyFile( - inputPath: string, - outputPath: string, - // options: object = {} - ): Promise { - - try { - // Read the input file - const inputCode = await fs.readFile(inputPath, 'utf8'); - // Minify the file using Terser - // const result = await minify(inputCode, options); - const result = await minify(inputCode, this.config); - // If minification is successful, write the output - if (result.code) { - await fs.writeFile(outputPath, result.code); - } else { - throw new Error('Minification resulted in empty output.'); - } - } catch (error) { - console.error(`Error minifying JavaScript file ${inputPath}:`, error); - throw error; - } - } - -} - - -// ============================================================================ -// Export -// ============================================================================ - -export default JavaScriptMinifier; diff --git a/script/ts/class/PackageCreator.ts b/script/ts/class/PackageCreator.ts deleted file mode 100644 index 4d8be178..00000000 --- a/script/ts/class/PackageCreator.ts +++ /dev/null @@ -1,65 +0,0 @@ -// script/class/PackageCreator.ts - -// Copyright 2023 Scape Agency BV - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -// ============================================================================ -// Import -// ============================================================================ - -import fs from 'fs'; -import path from 'path'; -// import * as pack from '../../package.json' assert { type: 'json' }; - - -// ============================================================================ -// Classes -// ============================================================================ - -/** - * A class for creating a package.json file for a project. - */ - class PackageCreator { - - private packageJson: PackageJson; - - /** - * Initializes a new instance of the PackageCreator class. - * @param {PackageJson} packageJson - The content to be written into package.json. - */ - constructor(packageJson: PackageJson) { - this.packageJson = packageJson; - } - - /** - * Creates a package.json file in the specified directory. - * @param {string} outputDir - The directory where package.json will be created. - */ - async createPackageJson(outputDir: string): Promise { - const filePath = path.join(outputDir, 'package.json'); - const data = JSON.stringify(this.packageJson, null, 2); - - fs.writeFileSync(filePath, data, 'utf-8'); - console.log(`package.json created at ${filePath}`); - } - -} - - -// ============================================================================ -// Export -// ============================================================================ - -export default PackageCreator; \ No newline at end of file diff --git a/script/ts/class/StyleProcessor.ts b/script/ts/class/StyleProcessor.ts deleted file mode 100644 index eda0779d..00000000 --- a/script/ts/class/StyleProcessor.ts +++ /dev/null @@ -1,96 +0,0 @@ -// script/class/StyleProcessor.ts - -// Copyright 2023 Scape Agency BV - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -// ============================================================================ -// Import -// ============================================================================ - -import * as sass from 'sass' -import postcss from 'postcss'; -import fs from 'fs'; -import postcssConfigExpanded from '../config/postcss.config.expanded.js'; -import postcssConfigCompressed from '../config/postcss.config.compressed.js'; - - -// ============================================================================ -// Classes -// ============================================================================ - -/** - * Class responsible for processing styles, including compiling SCSS and - * applying PostCSS transformations. - */ -class StyleProcessor { - - /** - * Processes the given CSS with PostCSS based on the provided style option. - * @param css The CSS string to process. - * @param styleOption The style option, either 'expanded' or 'compressed'. - * @returns Processed CSS string. - */ - async processPostCSS( - css: string, - styleOption: 'expanded' | 'compressed' - ) { - const config = styleOption === 'expanded' ? postcssConfigExpanded : postcssConfigCompressed; - return postcss(config.plugins).process(css, { from: undefined, map: { inline: false } }); - } - - /** - * Compiles SCSS to CSS and processes it using PostCSS. - * @param inputFile Path to the input SCSS file. - * @param outputFile Path to the output CSS file. - * @param styleOption Style option for the output. - */ - async processStyles( - inputFile: string, - outputFile: fs.PathOrFileDescriptor, - styleOption: 'expanded' | 'compressed' - ) { - try { - - // Compile SCSS to CSS - const result = await sass.compileAsync( - inputFile, { style: styleOption } - ); - - // Process the compiled CSS with PostCSS and Autoprefixer - const processed = await this.processPostCSS( - result.css, - styleOption - ); - - // Write the processed CSS to a file - fs.writeFileSync(outputFile, processed.css); - - // Write the source map file - if (processed.map) { - fs.writeFileSync(`${outputFile}.map`, processed.map.toString()); - } - } catch (err) { - // Handle errors in the compilation or processing - console.error(`Error processing styles from ${inputFile}:`, err); - } - } -} - - -// ============================================================================ -// Export -// ============================================================================ - -export default StyleProcessor; diff --git a/script/ts/class/SvgPackager.ts b/script/ts/class/SvgPackager.ts deleted file mode 100644 index 5b64daa5..00000000 --- a/script/ts/class/SvgPackager.ts +++ /dev/null @@ -1,285 +0,0 @@ -// script/class/SvgPackager.ts - -// Copyright 2023 Scape Agency BV - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -// ============================================================================ -// Import -// ============================================================================ - -import * as fs from 'fs/promises'; -import * as path from 'path'; -import * as glob from 'glob'; -import SVGO from 'svgo'; -import { loadConfig } from 'svgo'; - - -// ============================================================================ -// Classes -// ============================================================================ - -/** - * Class for packaging SVG files. - * This class reads SVG files from a specified directory, optimizes them, - * and creates corresponding TypeScript files. - */ -class SvgPackager { - - /** - * Constructor for SvgPackager class. - * Optionally accepts configurations or dependencies. - */ - constructor(private svgoConfigPath: string) {} - - /** - * Processes all SVG files in a given directory. - * @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( - inputDirectory: string, - outputDirectory: string, - ts_output_directory: string, - json_output_directory: string, - ): Promise { - - const iconNames: string[] = []; - - try { - 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 = await this.readSvgFile(file); - 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, - iconName, - resultSvg, - outputDirectory - ); - // Write the optimized TypeScript file - await this.writeTypeScriptFile( - // file, - iconName, - resultSvg, - ts_output_directory - ); - } - await this.writeIconsJson(iconNames, json_output_directory); - console.log(`Successfully processed ${svgFiles.length} SVG files.`); - } catch (error) { - console.error('Error processing SVG files:', error); - 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 { - 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 { - 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); - } - - /** - * Optimizes SVG content using SVGO. - * @param svgContent The raw SVG content. - * @returns The optimized SVG content. - */ - // private async optimizeSvg( - // filePath: string, - // svgContent: string - // ): Promise { - - // try { - - // 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 - // ); - - // 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.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); - } - - /** - * Writes the SVG content to a file. - * @param filePath The original file path of the SVG. - * @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(iconName: string, svgContent: string, outputDirectory: string): Promise { - const outputPath = path.join(outputDirectory, `${iconName}.svg`); - await fs.writeFile(outputPath, svgContent); - } - - /** - * Writes a JSON file containing the names of processed icons. - * This method creates a JSON file that lists all icon names which have - * been processed, making it easier to reference or index these icons in - * other parts of an application. - * - * @param iconNames An array of strings containing the names of the icons. - * @param outputDirectory The directory where the JSON file will be saved. - */ - private async writeIconsJson( - iconNames: string[], - outputDirectory: string - ): Promise { - - try { - const jsonContent = JSON.stringify(iconNames, null, 2); - const outputPath = path.join(outputDirectory, 'icons.json'); - // 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); - throw error; - } - } - - - -} - - -// ============================================================================ -// Export -// ============================================================================ - -export default SvgPackager; diff --git a/script/ts/class/SvgSpriteGenerator.ts b/script/ts/class/SvgSpriteGenerator.ts deleted file mode 100644 index 2646237c..00000000 --- a/script/ts/class/SvgSpriteGenerator.ts +++ /dev/null @@ -1,98 +0,0 @@ -// script/class/SvgSpriteGenerator.ts - -// Copyright 2023 Scape Agency BV - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -// ============================================================================ -// Import -// ============================================================================ - -import svgSprite from 'svg-sprite'; -import fs from 'fs'; -import path from 'path'; - - -// ============================================================================ -// Classes -// ============================================================================ - -/** - * A class for generating SVG sprites from individual SVG files. - */ -class SvgSpriteGenerator { - - private config: any; - - /** - * Constructs an instance of SvgSpriteGenerator with the provided configuration. - * @param {any} config - Configuration object for svg-sprite. - */ - constructor(config: any) { - this.config = config; - } - - /** - * Generates an SVG sprite from SVG files in a specified directory. - * @param {string} sourceDir - Directory containing source SVG files. - * @param {string} outputDir - Directory where the generated sprite will be saved. - */ - async generateSprite(sourceDir: string, outputDir: string) { - try { - const files = fs.readdirSync(sourceDir); - const sprite = new svgSprite(this.config); - - files.forEach(file => { - if (path.extname(file) === '.svg') { - const svgPath = path.resolve(sourceDir, file); - const content = fs.readFileSync(svgPath, 'utf8'); - sprite.add(svgPath, null, content); - } - }); - - sprite.compile((error, result) => { - if (error) { - throw error; - } - - for (const mode in result) { - for (const resource in result[mode]) { - const outputPath = path.resolve( - outputDir, - result[mode][resource].path - ); - fs.mkdirSync( - path.dirname(outputPath), - { recursive: true } - ); - fs.writeFileSync( - outputPath, - result[mode][resource].contents - ); - } - } - }); - - } catch (err) { - console.error('Error generating SVG sprite:', err); - } - } -} - - -// ============================================================================ -// Export -// ============================================================================ - -export default SvgSpriteGenerator; diff --git a/script/ts/class/TypeScriptCompiler.ts b/script/ts/class/TypeScriptCompiler.ts deleted file mode 100644 index a422b2e5..00000000 --- a/script/ts/class/TypeScriptCompiler.ts +++ /dev/null @@ -1,112 +0,0 @@ -// script/class/TypeScriptCompiler.ts - -// Copyright 2023 Scape Agency BV - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -// ============================================================================ -// Import -// ============================================================================ - -// import * as ts from 'typescript'; -import ts from 'typescript'; - - -// ============================================================================ -// Classes -// ============================================================================ - -/** - * TypeScriptCompiler class for compiling TypeScript files to JavaScript. - */ - class TypeScriptCompiler { - - private config: any; - - /** - * Constructs an instance with the provided configuration. - * @param {any} config - Configuration object - */ - constructor(config: any) { - this.config = config; - } - - /** - * Compiles TypeScript files to JavaScript. - * - * @param {string[]} filePaths - The paths of TypeScript files to be compiled. - * @param {string} outDir - The directory where the compiled JavaScript files will be saved. - * @param {ts.CompilerOptions} customOptions - Optional custom TypeScript compiler options. - * - * This method sets up a TypeScript program with given file paths and compiler options. - * It handles the compilation of TypeScript files into JavaScript, considering any provided custom options. - * Compilation errors and diagnostics are logged for debugging purposes. - * The method returns a promise that resolves when compilation is successful or rejects in case of errors. - */ - compile( - filePaths: string[], - outDir: string, - // customOptions: ts.CompilerOptions = {} - ): Promise { - return new Promise((resolve, reject) => { - - // Merge default options with custom options - const options: ts.CompilerOptions = { - module: ts.ModuleKind.CommonJS, - target: ts.ScriptTarget.ES2015, - outDir, - // ...customOptions, // Merges custom compiler options - ...this.config, // Merges custom compiler options - }; - - // Create a TypeScript compiler host - const host = ts.createCompilerHost(options); - - // Create a program with the specified files and options - const program = ts.createProgram(filePaths, options, host); - - // Emit the compiled JavaScript files - const emitResult = program.emit(); - - // Check for compilation errors - const allDiagnostics = ts.getPreEmitDiagnostics(program).concat(emitResult.diagnostics); - allDiagnostics.forEach(diagnostic => { - // Handle and print diagnostics - if (diagnostic.file) { - const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start!); - const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); - console.error(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`); - } else { - console.error(ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n')); - } - }); - - const exitCode = emitResult.emitSkipped ? 1 : 0; - if (exitCode === 0) { - console.log('Compilation completed successfully.'); - resolve(); - } else { - console.error('Compilation failed.'); - reject(new Error('TypeScript compilation failed')); - } - }); - } -} - - -// ============================================================================ -// Export -// ============================================================================ - -export default TypeScriptCompiler; diff --git a/script/ts/class/VersionWriter.ts b/script/ts/class/VersionWriter.ts deleted file mode 100644 index db113201..00000000 --- a/script/ts/class/VersionWriter.ts +++ /dev/null @@ -1,57 +0,0 @@ -// script/class/VersionWriter.ts - -// Copyright 2023 Scape Agency BV - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -// ============================================================================ -// Import -// ============================================================================ - -import { promises as fs } from 'fs'; - - -// ============================================================================ -// Classes -// ============================================================================ - -/** - * A class for writing version information to a file. - */ - class VersionWriter { - - /** - * Writes the specified version string to a file. - * @param {string} filePath - The file path where the version will be written. - * @param {string} version - The version string to write to the file. - */ - async writeVersionToFile( - filePath: string, - version: string, - ): Promise { - try { - await fs.writeFile(filePath, version, 'utf8'); - console.log(`Version ${version} written to ${filePath}`); - } catch (error) { - console.error(`Error writing version to file: ${error}`); - } - } -} - - -// ============================================================================ -// Export -// ============================================================================ - -export default VersionWriter; diff --git a/script/ts/config/config.ts b/script/ts/config/config.ts deleted file mode 100644 index 9c0739b4..00000000 --- a/script/ts/config/config.ts +++ /dev/null @@ -1,24 +0,0 @@ - -export const CONFIG = { - path: { - src: './src', - dist: './dist', - - svg_input: './src/svg', - svg_output: './dist/svg', - sprite_input: './dist/svg', - sprite_output: './dist/sprite', - font_input: './dist/svg', - font_output: './dist/font', - scss_input: './src/scss', - scss_output: './dist/scss', - css_output: './dist/css', - json_output: './dist', - ts_input: './src/ts', - ts_output: './dist/ts', - ts_output_icons: './src/ts/icons', - js_output: './dist/js', - - }, - -}; \ No newline at end of file diff --git a/script/ts/config/fantasticon.config.ts b/script/ts/config/fantasticon.config.ts deleted file mode 100644 index b06e1be5..00000000 --- a/script/ts/config/fantasticon.config.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { generateFonts, FontAssetType, OtherAssetType } from 'fantasticon'; - - -// export const fontConfig = { - - -// // RunnerMandatoryOptions -// inputDir: sourceDirectory, // (required) -// outputDir: outputDiectory, // (required) - -// // RunnerOptionalOptions -// name: 'icon.gl', -// fontTypes: [ -// FontAssetType.TTF, // TTF = "ttf" -// FontAssetType.WOFF, // WOFF = "woff" -// FontAssetType.WOFF2, // WOFF2 = "woff2" -// FontAssetType.EOT, // EOT = "eot" -// FontAssetType.SVG, // SVG = "svg" -// ], -// assetTypes: [ -// OtherAssetType.CSS, // CSS = "css", -// OtherAssetType.SCSS, // SCSS = "scss", -// OtherAssetType.SASS, // SASS = "sass", -// OtherAssetType.HTML, // HTML = "html", -// OtherAssetType.JSON, // JSON = "json", -// OtherAssetType.TS, // TS = "ts" -// ], - - - -// formatOptions: { -// // woff: { -// // // Woff Extended Metadata Block - see https://www.w3.org/TR/WOFF/#Metadata -// // metadata: '...' -// // }, -// // ttf?: TtfOptions; // type TtfOptions = svg2ttf.FontOptions; -// // svg?: SvgOptions; // type SvgOptions = Omit; -// json: { indent: 4 } , -// // ts: { -// // // select what kind of types you want to generate -// // // (default `['enum', 'constant', 'literalId', 'literalKey']`) -// // types: ['enum', 'constant', 'literalId', 'literalKey'], -// // // render the types with `'` instead of `"` (default is `"`) -// // singleQuotes: false, -// // // customise names used for the generated types and constants -// // enumName: 'icon_gl', -// // constantName: 'MY_CODEPOINTS' -// // // literalIdName: 'IconId', -// // // literalKeyName: 'IconKey' -// // } -// }, -// pathOptions: { -// json: './dist/font/icon.gl.json', -// css: './dist/font/icon.gl.css', -// scss: './dist/font/icon.gl.scss', -// woff: './dist/font/icon.gl.woff', -// woff2: './dist/font/icon.gl.woff2', -// }, -// // codepoints: { -// // 'chevron-left': 57344, // decimal representation of 0xe000 -// // 'chevron-right': 57345, -// // 'thumbs-up': 57358, -// // 'thumbs-down': 57359, -// // }, -// // fontHeight: number; -// // descent: number; -// // normalize: boolean; -// // round: number; -// selector: '.igl', -// // tag: string; -// // Use our custom Handlebars templates -// // templates: { -// // css: './build/font/icon.gl.css.hbs', -// // scss: './build/font/icon.gl.scss.hbs' -// // }, -// prefix: 'igl', -// fontsUrl: './fonts', - -// // Customize generated icon IDs (unavailable with `.json` config file) -// // getIconId: ({ -// // basename, // `string` - Example: 'foo'; -// // relativeDirPath, // `string` - Example: 'sub/dir/foo.svg' -// // absoluteFilePath, // `string` - Example: '/var/icons/sub/dir/foo.svg' -// // relativeFilePath, // `string` - Example: 'foo.svg' -// // index // `number` - Example: `0` -// // }) => [index, basename].join('_') // '0_foo' - -// }; diff --git a/script/ts/config/package.config.ts b/script/ts/config/package.config.ts deleted file mode 100644 index f341502b..00000000 --- a/script/ts/config/package.config.ts +++ /dev/null @@ -1,55 +0,0 @@ -import * as pack_object from '../../../package.json' assert { type: 'json' }; - -const pack = JSON.parse(JSON.stringify(pack_object)).default; // req.body = [Object: null prototype] { title: 'product' } - - -const packageConfig = { - name: pack.name, - version: pack.version, - description: pack.description, - keywords: pack.keywords, - license: pack.license, - homepage: pack.homepage, - main: 'index.js', - files: [ - "svg/**/*.{svg}", - "js/**/*.{js,map}", - "ts/**/*.ts", - "css/**/*.{css,map}", - "scss/**/*.{scss}", - "font/**/*.{eot,otf,ttf,woff,woff2}", - "!.DS_Store" - ], - // repository: { - // type: pack.repository.type, - // url: pack.repository.url, - // }, - - // author?: string | { - // name: string; - // email?: string; - // url?: string; - // }; - // bugs?: { - // url?: string; - // email?: string; - // }; - - // contributors?: Array; - // funding?: string | { - // type: string; - // url: string; - // }; - - -} - -// ============================================================================ -// Export -// ============================================================================ - -export default packageConfig; diff --git a/script/ts/config/postcss.config.compressed.ts b/script/ts/config/postcss.config.compressed.ts deleted file mode 100644 index b151bc67..00000000 --- a/script/ts/config/postcss.config.compressed.ts +++ /dev/null @@ -1,47 +0,0 @@ -// script/config/postcss.config.compressed.ts - -// Copyright 2023 Scape Agency BV - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -// ============================================================================ -// Import -// ============================================================================ - -import autoprefixer from 'autoprefixer'; -import cssnano from 'cssnano'; - - -// ============================================================================ -// Constants -// ============================================================================ - -const postcssConfigCompressed = { - plugins: [ - autoprefixer, - // Minification for compressed output - cssnano( - { - preset: 'default' - }, - ), - ] -}; - - -// ============================================================================ -// Export -// ============================================================================ - -export default postcssConfigCompressed; diff --git a/script/ts/config/postcss.config.expanded.ts b/script/ts/config/postcss.config.expanded.ts deleted file mode 100644 index ff82010c..00000000 --- a/script/ts/config/postcss.config.expanded.ts +++ /dev/null @@ -1,42 +0,0 @@ -// script/config/postcss.config.expanded.ts - -// Copyright 2023 Scape Agency BV - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -// ============================================================================ -// Import -// ============================================================================ - -import autoprefixer from 'autoprefixer'; -import cssnano from 'cssnano'; - - -// ============================================================================ -// Constants -// ============================================================================ - -const postcssConfigExpanded = { - plugins: [ - autoprefixer, - // Include other plugins suited for the expanded output - ] -}; - - -// ============================================================================ -// Export -// ============================================================================ - -export default postcssConfigExpanded; diff --git a/script/ts/config/svgo.config.ts b/script/ts/config/svgo.config.ts deleted file mode 100644 index eb14ed5e..00000000 --- a/script/ts/config/svgo.config.ts +++ /dev/null @@ -1,115 +0,0 @@ -// script/config/svgo.config.ts - -// Copyright 2023 Scape Agency BV - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -// ============================================================================ -// Import -// ============================================================================ - -import path from 'node:path' - - -// ============================================================================ -// Constants -// ============================================================================ - -const svgoConfig = { - multipass: true, - js2svg: { - pretty: true, - indent: 2, - eol: 'lf' - }, - plugins: [ - { - name: 'preset-default', - params: { - overrides: { - removeUnknownsAndDefaults: { - // remove all `data` attributes - keepDataAttrs: false, - // keep the `role` attribute - keepRoleAttr: true, - }, - - // keep the `viewBox` attribute - removeViewBox: false, - - // customize the params of a default plugin - inlineStyles: { - onlyMatchedOnce: false, - } - } - } - }, - // The next plugins are included in svgo but are not part of preset-default, - // so we need to explicitly enable them - 'cleanupListOfValues', - { - name: 'removeAttrs', - params: { - attrs: [ - 'clip-rule', - 'fill' - ] - } - }, - // Custom plugin which resets the SVG attributes to explicit values - { - name: 'explicitAttrs', - type: 'visitor', - params: { - attributes: { - xmlns: 'http://www.w3.org/2000/svg', - width: '16', - height: '16', - fill: 'currentColor', - class: '', // We replace the class with the correct one based on filename later - viewBox: '0 0 16 16' - } - }, - fn(_root: any, params: { attributes: { [s: string]: unknown; } | ArrayLike; }, info: { path: string; }) { - if (!params.attributes) { - return null - } - const pathname = info.path - const basename = path.basename(pathname, '.svg') - - return { - element: { - enter(node: { name: string; attributes: { [x: string]: unknown; }; }, parentNode: { type: string; }) { - if (node.name === 'svg' && parentNode.type === 'root') { - // We set the `svgAttributes` in the order we want to, - // hence why we remove the attributes and add them back - node.attributes = {} - for (const [key, value] of Object.entries(params.attributes)) { - node.attributes[key] = key === 'class' ? `igl igl-${basename}` : value - } - } - } - } - } - } - } - ] -}; - - -// ============================================================================ -// Export -// ============================================================================ - -export default svgoConfig; diff --git a/script/ts/config/svgsprite.config.ts b/script/ts/config/svgsprite.config.ts deleted file mode 100644 index 39627598..00000000 --- a/script/ts/config/svgsprite.config.ts +++ /dev/null @@ -1,137 +0,0 @@ -// script/config/svg-sprite.config.ts - -// Copyright 2023 Scape Agency BV - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -// ============================================================================ -// Import -// ============================================================================ - -import svgSprite from "svg-sprite"; - - -// ============================================================================ -// Constants -// ============================================================================ - -const svgspriteConfig: svgSprite.Config = { - dest: './dist/sprite', // Main output directory - // log: null, // Logging verbosity (default: no logging) - shape: { // SVG shape related options - id: { - separator: '--', // Separator for directory name traversal - generator: 'icon-%s', - // generator: function () { /*...*/ }, // SVG shape ID generator callback - pseudo: '~' // File name separator for shape states (e.g. ':hover') - }, - dimension: {// Dimension related options - maxWidth: 2000, // Max. shape width - maxHeight: 2000, // Max. shape height - precision: 2, // Floating point precision - attributes: false, // Width and height attributes on embedded shapes - }, - spacing: { // Spacing related options - padding: 0, // Padding around all shapes - box: 'content' // Padding strategy (similar to CSS `box-sizing`) - }, - transform: ['svgo'], // List of transformations / optimizations - // meta: null, // Path to YAML file with meta / accessibility data - // align: null, // Path to YAML file with extended alignment data - // dest: null // Output directory for optimized intermediate SVG shapes - }, - svg: { // General options for created SVG files - xmlDeclaration: false, // Add XML declaration to SVG sprite - // xmlDeclaration: true, // Add XML declaration to SVG sprite - doctypeDeclaration: true, // Add DOCTYPE declaration to SVG sprite - namespaceIDs: true, // Add namespace token to all IDs in SVG shapes - // namespaceIDPrefix: '', // Add a prefix to the automatically generated namespaceIDs - // namespaceClassnames: true, // Add namespace token to all CSS class names in SVG shapes - namespaceClassnames: false, // Add namespace token to all CSS class names in SVG shapes - dimensionAttributes: true // Width and height attributes on the sprite - }, - variables: {}, // Custom Mustache templating variables and functions - mode: { - css: { // CSS sprite mode - render: { - css: true // Render CSS stylesheet - } - }, - view: true, // Create a «view» sprite - defs: true, // Create a «defs» sprite - // symbol: true, // Create a «symbol» sprite - symbol: { // Create a «symbol» sprite - // dest: ".", - // inline: true, // Prepare for inline embedding - sprite: "icon.gl.svg" - }, - stack: true, // Create a «stack» sprite - // symbol: true // Symbol sprite mode - - } -}; - - -// ============================================================================ -// Export -// ============================================================================ - -export default svgspriteConfig; - - // "svgo": { - // "multipass": true, - // "plugins": [ - // { - // "name": "preset-default", - // "params": { - // "overrides": { - // "removeUnknownsAndDefaults": { - // "keepDataAttrs": false, - // "keepRoleAttr": true - // }, - // "removeViewBox": false - // } - // } - // }, - // "cleanupListOfValues", - // "removeXMLNS", - // { - // "name": "removeAttrs", - // "params": { - // "attrs": [ - // "clip-rule", - // "fill" - // ] - // } - // } - // ] - // } - - // : { - // dest: "", // Mode specific output directory - // prefix: "svg-%s", // Prefix for CSS selectors - // dimensions: "-dims", // Suffix for dimension CSS selectors - // sprite: "svg/sprite..svg", // Sprite path and name - // bust: true || false, // Cache busting (mode dependent default value) - // render: { // Stylesheet rendering definitions - // /* ------------------------------------------- - // css: false, // CSS stylesheet options - // scss: false, // Sass stylesheet options - // less: false, // LESS stylesheet options - // styl: false, // Stylus stylesheet options - // : ... // Custom stylesheet options - // ------------------------------------------- */ - // }, - // example: false // Create an HTML example document - // } \ No newline at end of file diff --git a/script/ts/config/terser.config.ts b/script/ts/config/terser.config.ts deleted file mode 100644 index 87268eb7..00000000 --- a/script/ts/config/terser.config.ts +++ /dev/null @@ -1,28 +0,0 @@ - - - -const terserCofig = { - compress: { - drop_console: true, // Remove console.log statements - drop_debugger: true, // Remove debugger statements - pure_funcs: ['console.info', 'console.debug', 'console.warn'], // Remove specific console functions - }, - mangle: { - // Mangle names for obfuscation and size reduction - properties: true, // Mangle property names - }, - format: { - comments: false, // Remove comments - beautify: false, // Disable beautification for smaller file size - }, - keep_classnames: false, // Remove class names - keep_fnames: false, // Remove function names - toplevel: true, // Enable top-level variable and function name mangling -}; - - -// ============================================================================ -// Export -// ============================================================================ - -export default terserCofig; diff --git a/script/ts/config/ts.config.ts b/script/ts/config/ts.config.ts deleted file mode 100644 index 77b888b6..00000000 --- a/script/ts/config/ts.config.ts +++ /dev/null @@ -1,116 +0,0 @@ - - - -const tsConfig = { - // allowImportingTsExtensions?: boolean; - // allowJs?: boolean; - // allowArbitraryExtensions?: boolean; - // allowSyntheticDefaultImports?: boolean; - // allowUmdGlobalAccess?: boolean; - // allowUnreachableCode?: boolean; - // allowUnusedLabels?: boolean; - // alwaysStrict?: boolean; - // baseUrl?: string; - // charset?: string; - // checkJs?: boolean; - // customConditions?: string[]; - // declaration?: boolean; - // declarationMap?: boolean; - // emitDeclarationOnly?: boolean; - // declarationDir?: string; - // disableSizeLimit?: boolean; - // disableSourceOfProjectReferenceRedirect?: boolean; - // disableSolutionSearching?: boolean; - // disableReferencedProjectLoad?: boolean; - // downlevelIteration?: boolean; - // emitBOM?: boolean; - // emitDecoratorMetadata?: boolean; - // exactOptionalPropertyTypes?: boolean; - // experimentalDecorators?: boolean; - // forceConsistentCasingInFileNames?: boolean; - // ignoreDeprecations?: string; - // importHelpers?: boolean; - // importsNotUsedAsValues?: ImportsNotUsedAsValues; - // inlineSourceMap?: boolean; - // inlineSources?: boolean; - // isolatedModules?: boolean; - // jsx?: JsxEmit; - // keyofStringsOnly?: boolean; - // lib?: string[]; - // locale?: string; - // mapRoot?: string; - // maxNodeModuleJsDepth?: number; - // module?: ModuleKind; - // moduleResolution?: ModuleResolutionKind; - // moduleSuffixes?: string[]; - // moduleDetection?: ModuleDetectionKind; - // newLine?: NewLineKind; - // noEmit?: boolean; - // noEmitHelpers?: boolean; - // noEmitOnError?: boolean; - // noErrorTruncation?: boolean; - // noFallthroughCasesInSwitch?: boolean; - // noImplicitAny?: boolean; - // noImplicitReturns?: boolean; - // noImplicitThis?: boolean; - // noStrictGenericChecks?: boolean; - // noUnusedLocals?: boolean; - // noUnusedParameters?: boolean; - // noImplicitUseStrict?: boolean; - // noPropertyAccessFromIndexSignature?: boolean; - // assumeChangesOnlyAffectDirectDependencies?: boolean; - // noLib?: boolean; - // noResolve?: boolean; - // noUncheckedIndexedAccess?: boolean; - // out?: string; - // outDir?: string; - // outFile: 'icon.gl.js' // string; - // paths?: MapLike; - // preserveConstEnums?: boolean; - // noImplicitOverride?: boolean; - // preserveSymlinks?: boolean; - // preserveValueImports?: boolean; - // project?: string; - // reactNamespace?: string; - // jsxFactory?: string; - // jsxFragmentFactory?: string; - // jsxImportSource?: string; - // composite?: boolean; - // incremental?: boolean; - // tsBuildInfoFile?: string; - // removeComments?: boolean; - // resolvePackageJsonExports?: boolean; - // resolvePackageJsonImports?: boolean; - // rootDir?: string; - // rootDirs?: string[]; - // skipLibCheck?: boolean; - // skipDefaultLibCheck?: boolean; - // sourceMap?: boolean; - // sourceRoot?: string; - // strict?: boolean; - // strictFunctionTypes?: boolean; - // strictBindCallApply?: boolean; - // strictNullChecks?: boolean; - // strictPropertyInitialization?: boolean; - // stripInternal?: boolean; - // suppressExcessPropertyErrors?: boolean; - // suppressImplicitAnyIndexErrors?: boolean; - // target?: ScriptTarget; - // traceResolution?: boolean; - // useUnknownInCatchVariables?: boolean; - // resolveJsonModule?: boolean; - // types?: string[]; - // /** Paths used to compute primary types search locations */ - // typeRoots?: string[]; - // verbatimModuleSyntax?: boolean; - // esModuleInterop?: boolean; - // useDefineForClassFields?: boolean; - // [option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined; -}; - - -// ============================================================================ -// Export -// ============================================================================ - -export default tsConfig; diff --git a/script/ts/interfaces/File.ts b/script/ts/interfaces/File.ts deleted file mode 100644 index 4f47dc86..00000000 --- a/script/ts/interfaces/File.ts +++ /dev/null @@ -1,4 +0,0 @@ -interface File { - filepath: string; - source: string; -} \ No newline at end of file diff --git a/script/ts/interfaces/PackageJson.ts b/script/ts/interfaces/PackageJson.ts deleted file mode 100644 index 15078deb..00000000 --- a/script/ts/interfaces/PackageJson.ts +++ /dev/null @@ -1,70 +0,0 @@ -// ============================================================================ -// Interfaces -// ============================================================================ - -interface PackageJson { - name: string; - version: string; - description?: string; - main?: string; - scripts?: Record; - dependencies?: Record; - devDependencies?: Record; - repository?: { - type: string; - url: string; - }; - keywords?: string[]; - author?: string | { - name: string; - email?: string; - url?: string; - }; - license?: string; - bugs?: { - url?: string; - email?: string; - }; - homepage?: string; - private?: boolean; - peerDependencies?: Record; - engines?: { - node?: string; - npm?: string; - }; - bin?: Record; - types?: string; - contributors?: Array; - funding?: string | { - type: string; - url: string; - }; - files?: string[]; - browserslist?: string[] | Record; - publishConfig?: Record; - config?: Record; - typings?: string; - exports?: Record; - module?: string; - sideEffects?: boolean | string[]; - - optionalDependencies?: Record; - bundledDependencies?: string[]; // or bundleDependencies - peerDependenciesMeta?: Record; - resolutions?: Record; - workspaces?: string[] | { - packages: string[]; - }; - eslintConfig?: Record; - babel?: Record; - prettier?: Record; - husky?: Record; - jest?: Record; - enginesStrict?: boolean; - os?: string[]; - cpu?: string[]; -} diff --git a/script/ts/interfaces/SVG.ts b/script/ts/interfaces/SVG.ts deleted file mode 100644 index 4a18efa8..00000000 --- a/script/ts/interfaces/SVG.ts +++ /dev/null @@ -1,12 +0,0 @@ - - - -// Assuming the structure of your SVG object, you might need to adjust these types -interface Svg { - metadata: { - name: string; - // ... other metadata properties - }; - source: string; - // ... other Svg properties - } \ No newline at end of file