From fcd3aef013313e63ee0e3daa44aa71010aa339fc Mon Sep 17 00:00:00 2001 From: Lars van Vianen Date: Wed, 3 Jan 2024 22:53:41 +0100 Subject: [PATCH] v0.0.23 --- VERSION | 2 +- dist/package.json | 2 +- package-lock.json | 33 +- package.json | 4 +- script/hbs/icon.gl.css.hbs | 30 -- script/hbs/icon.gl.html.hbs | 71 ---- script/hbs/icon.gl.sass.hbs | 35 -- script/hbs/icon.gl.scss.hbs | 43 --- script/js/class/DirCopier.js | 30 -- script/js/class/DirCopier.js.map | 1 - script/js/class/DirectoryCleaner.d.ts | 4 - script/js/class/DirectoryCleaner.js | 24 -- script/js/class/DirectoryCleaner.js.map | 1 - script/js/class/DirectoryCopier.d.ts | 5 - script/js/class/DirectoryCopier.js | 71 ---- script/js/class/DirectoryCopier.js.map | 1 - script/js/class/DirectoryCreator.d.ts | 4 - script/js/class/DirectoryCreator.js | 27 -- script/js/class/DirectoryCreator.js.map | 1 - script/js/class/FileCopier.d.ts | 4 - script/js/class/FileCopier.js | 33 -- script/js/class/FileCopier.js.map | 1 - script/js/class/FileRenamer.d.ts | 4 - script/js/class/FileRenamer.js | 30 -- script/js/class/FileRenamer.js.map | 1 - script/js/class/FontGenerator.d.ts | 4 - script/js/class/FontGenerator.js | 65 ---- script/js/class/FontGenerator.js.map | 1 - script/js/class/JavaScriptMinifier.d.ts | 6 - script/js/class/JavaScriptMinifier.js | 40 --- script/js/class/JavaScriptMinifier.js.map | 1 - script/js/class/ModulePackager.js | 41 --- script/js/class/ModulePackager.js.map | 1 - script/js/class/PackageCreator.d.ts | 8 - script/js/class/PackageCreator.js | 73 ----- script/js/class/PackageCreator.js.map | 1 - script/js/class/StyleProcessor.d.ts | 8 - script/js/class/StyleProcessor.js | 49 --- script/js/class/StyleProcessor.js.map | 1 - script/js/class/SvgPackager.d.ts | 10 - script/js/class/SvgPackager.js | 183 ----------- script/js/class/SvgPackager.js.map | 1 - script/js/class/SvgSpriteGenerator.d.ts | 6 - script/js/class/SvgSpriteGenerator.js | 46 --- script/js/class/SvgSpriteGenerator.js.map | 1 - script/js/class/TypeScriptCompiler.d.ts | 7 - script/js/class/TypeScriptCompiler.js | 42 --- script/js/class/TypeScriptCompiler.js.map | 1 - script/js/class/VersionWriter.d.ts | 4 - script/js/class/VersionWriter.js | 30 -- script/js/class/VersionWriter.js.map | 1 - script/js/config/config.d.ts | 10 - script/js/config/config.js | 11 - script/js/config/config.js.map | 1 - script/js/config/fantasticon.config.d.ts | 1 - script/js/config/fantasticon.config.js | 2 - script/js/config/fantasticon.config.js.map | 1 - script/js/config/package.config.d.ts | 12 - script/js/config/package.config.js | 22 -- script/js/config/package.config.js.map | 1 - .../js/config/postcss.config.compressed.d.ts | 5 - script/js/config/postcss.config.compressed.js | 12 - .../config/postcss.config.compressed.js.map | 1 - script/js/config/postcss.config.expanded.d.ts | 5 - script/js/config/postcss.config.expanded.js | 8 - .../js/config/postcss.config.expanded.js.map | 1 - script/js/config/svgo.config.d.ts | 72 ----- script/js/config/svgo.config.js | 72 ----- script/js/config/svgo.config.js.map | 1 - script/js/config/svgsprite.config.d.ts | 3 - script/js/config/svgsprite.config.js | 44 --- script/js/config/svgsprite.config.js.map | 1 - script/js/config/terser.config.d.ts | 18 -- script/js/config/terser.config.js | 19 -- script/js/config/terser.config.js.map | 1 - script/js/config/ts.config.d.ts | 13 - script/js/config/ts.config.js | 14 - script/js/config/ts.config.js.map | 1 - script/js/function/clean_directory.d.ts | 2 - script/js/function/clean_directory.js | 29 -- script/js/function/clean_directory.js.map | 1 - script/js/function/gl_installer.d.ts | 2 - script/js/function/gl_installer.js | 52 --- script/js/function/gl_installer.js.map | 1 - script/js/function/readPackageJson.d.ts | 2 - script/js/function/readPackageJson.js | 20 -- script/js/function/readPackageJson.js.map | 1 - script/js/index.js | 68 ++-- script/js/index.js.map | 2 +- script/js/interface/File.d.ts | 4 - script/js/interface/File.js | 2 - script/js/interface/File.js.map | 1 - script/js/interface/PackageJson.d.ts | 67 ---- script/js/interface/PackageJson.js | 2 - script/js/interface/PackageJson.js.map | 1 - script/js/interface/SVG.d.ts | 6 - script/js/interface/SVG.js | 2 - script/js/interface/SVG.js.map | 1 - script/js/interfaces/File.d.ts | 4 - script/js/interfaces/File.js | 2 - script/js/interfaces/File.js.map | 1 - script/js/interfaces/PackageJson.d.ts | 67 ---- script/js/interfaces/PackageJson.js | 2 - script/js/interfaces/PackageJson.js.map | 1 - script/js/interfaces/SVG.d.ts | 6 - script/js/interfaces/SVG.js | 2 - script/js/interfaces/SVG.js.map | 1 - script/ts/class/PackageCreator.ts | 167 ---------- script/ts/class/TypeScriptCompiler.ts | 242 -------------- script/ts/config/config.ts | 13 - script/ts/config/fantasticon.config.ts | 88 ----- script/ts/config/package.config.ts | 56 ---- 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 | 305 ------------------ script/ts/function/readPackageJson.ts | 16 - script/ts/index.ts | 129 +++----- script/ts/interface/File.ts | 4 - script/ts/interface/PackageJson.ts | 70 ---- script/ts/interface/SVG.ts | 12 - 123 files changed, 104 insertions(+), 3164 deletions(-) delete mode 100644 script/hbs/icon.gl.css.hbs delete mode 100644 script/hbs/icon.gl.html.hbs delete mode 100644 script/hbs/icon.gl.sass.hbs delete mode 100644 script/hbs/icon.gl.scss.hbs delete mode 100644 script/js/class/DirCopier.js delete mode 100644 script/js/class/DirCopier.js.map delete mode 100644 script/js/class/DirectoryCleaner.d.ts delete mode 100644 script/js/class/DirectoryCleaner.js delete mode 100644 script/js/class/DirectoryCleaner.js.map delete mode 100644 script/js/class/DirectoryCopier.d.ts delete mode 100644 script/js/class/DirectoryCopier.js delete mode 100644 script/js/class/DirectoryCopier.js.map delete mode 100644 script/js/class/DirectoryCreator.d.ts delete mode 100644 script/js/class/DirectoryCreator.js delete mode 100644 script/js/class/DirectoryCreator.js.map delete mode 100644 script/js/class/FileCopier.d.ts delete mode 100644 script/js/class/FileCopier.js delete mode 100644 script/js/class/FileCopier.js.map delete mode 100644 script/js/class/FileRenamer.d.ts delete mode 100644 script/js/class/FileRenamer.js delete mode 100644 script/js/class/FileRenamer.js.map delete mode 100644 script/js/class/FontGenerator.d.ts delete mode 100644 script/js/class/FontGenerator.js delete mode 100644 script/js/class/FontGenerator.js.map delete mode 100644 script/js/class/JavaScriptMinifier.d.ts delete mode 100644 script/js/class/JavaScriptMinifier.js delete mode 100644 script/js/class/JavaScriptMinifier.js.map delete mode 100644 script/js/class/ModulePackager.js delete mode 100644 script/js/class/ModulePackager.js.map delete mode 100644 script/js/class/PackageCreator.d.ts delete mode 100644 script/js/class/PackageCreator.js delete mode 100644 script/js/class/PackageCreator.js.map delete mode 100644 script/js/class/StyleProcessor.d.ts delete mode 100644 script/js/class/StyleProcessor.js delete mode 100644 script/js/class/StyleProcessor.js.map delete mode 100644 script/js/class/SvgPackager.d.ts delete mode 100644 script/js/class/SvgPackager.js delete mode 100644 script/js/class/SvgPackager.js.map delete mode 100644 script/js/class/SvgSpriteGenerator.d.ts delete mode 100644 script/js/class/SvgSpriteGenerator.js delete mode 100644 script/js/class/SvgSpriteGenerator.js.map delete mode 100644 script/js/class/TypeScriptCompiler.d.ts delete mode 100644 script/js/class/TypeScriptCompiler.js delete mode 100644 script/js/class/TypeScriptCompiler.js.map delete mode 100644 script/js/class/VersionWriter.d.ts delete mode 100644 script/js/class/VersionWriter.js delete mode 100644 script/js/class/VersionWriter.js.map delete mode 100644 script/js/config/config.d.ts 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.d.ts 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.d.ts 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.d.ts 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.d.ts 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.d.ts 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.d.ts 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.d.ts 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.d.ts delete mode 100644 script/js/config/ts.config.js delete mode 100644 script/js/config/ts.config.js.map delete mode 100644 script/js/function/clean_directory.d.ts delete mode 100644 script/js/function/clean_directory.js delete mode 100644 script/js/function/clean_directory.js.map delete mode 100644 script/js/function/gl_installer.d.ts delete mode 100644 script/js/function/gl_installer.js delete mode 100644 script/js/function/gl_installer.js.map delete mode 100644 script/js/function/readPackageJson.d.ts delete mode 100644 script/js/function/readPackageJson.js delete mode 100644 script/js/function/readPackageJson.js.map delete mode 100644 script/js/interface/File.d.ts delete mode 100644 script/js/interface/File.js delete mode 100644 script/js/interface/File.js.map delete mode 100644 script/js/interface/PackageJson.d.ts delete mode 100644 script/js/interface/PackageJson.js delete mode 100644 script/js/interface/PackageJson.js.map delete mode 100644 script/js/interface/SVG.d.ts delete mode 100644 script/js/interface/SVG.js delete mode 100644 script/js/interface/SVG.js.map delete mode 100644 script/js/interfaces/File.d.ts delete mode 100644 script/js/interfaces/File.js delete mode 100644 script/js/interfaces/File.js.map delete mode 100644 script/js/interfaces/PackageJson.d.ts delete mode 100644 script/js/interfaces/PackageJson.js delete mode 100644 script/js/interfaces/PackageJson.js.map delete mode 100644 script/js/interfaces/SVG.d.ts delete mode 100644 script/js/interfaces/SVG.js delete mode 100644 script/js/interfaces/SVG.js.map delete mode 100644 script/ts/class/PackageCreator.ts delete mode 100644 script/ts/class/TypeScriptCompiler.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/function/readPackageJson.ts delete mode 100644 script/ts/interface/File.ts delete mode 100644 script/ts/interface/PackageJson.ts delete mode 100644 script/ts/interface/SVG.ts diff --git a/VERSION b/VERSION index fe059cc..95dfee2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.22 \ No newline at end of file +0.0.23 \ No newline at end of file diff --git a/dist/package.json b/dist/package.json index 57ede8c..718a7ac 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "pack.gl", - "version": "0.0.22", + "version": "0.0.23", "description": "Package Builder.", "keywords": [ "pack.gl", diff --git a/package-lock.json b/package-lock.json index 608bb5e..d3385f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pack.gl", - "version": "0.0.20", + "version": "0.0.23", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pack.gl", - "version": "0.0.20", + "version": "0.0.23", "funding": [ { "type": "github", @@ -62,7 +62,7 @@ "icon.gl": "^0.0.1", "loop.gl": "^0.0.1", "mini-css-extract-plugin": "^2.7.6", - "pack.gl": "^0.0.19", + "pack.gl": "^0.0.22", "page.gl": "^0.0.1", "postcss-loader": "^7.3.3", "postcss-preset-env": "^9.1.2", @@ -11239,10 +11239,29 @@ } }, "node_modules/pack.gl": { - "version": "0.0.19", - "resolved": "https://registry.npmjs.org/pack.gl/-/pack.gl-0.0.19.tgz", - "integrity": "sha512-YCapun26veMmjqJMDK+Z6m+PBz+waeeHU+E0+UcyPqEKf5LW72lIbdbVshTbbekum06YcIzjqU0a9bzZy8p6Xg==", - "dev": true + "version": "0.0.22", + "resolved": "https://registry.npmjs.org/pack.gl/-/pack.gl-0.0.22.tgz", + "integrity": "sha512-1T7m54/IxMyywIIWcy9czE3clWclwZV0CnMB6AKKoSKFbiIWh9qKN8B7BRiad4gJmoMy2kvtRZurdpPDmnb0MA==", + "dev": true, + "dependencies": { + "@types/fs-extra": "^11.0.4", + "@types/glob": "^8.1.0", + "@types/nunjucks": "^3.2.6", + "@types/svg-sprite": "^0.0.38", + "autoprefixer": "^10.4.15", + "del": "^7.1.0", + "fantasticon": "^2.0.0", + "fs-extra": "^11.2.0", + "glob": "^10.3.10", + "jsdom": "^23.0.1", + "lodash": "^4.17.21", + "nunjucks": "^3.2.4", + "sass": "^1.69.7", + "sharp": "^0.33.1", + "svg-sprite": "^2.0.2", + "svgo": "^3.1.0", + "terser": "^5.26.0" + } }, "node_modules/page.gl": { "version": "0.0.1", diff --git a/package.json b/package.json index 904d97e..55fc055 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "pack.gl", "description": "Package Builder.", - "version": "0.0.22", + "version": "0.0.23", "config": { "version_short": "0.0" }, @@ -95,7 +95,7 @@ "icon.gl": "^0.0.1", "loop.gl": "^0.0.1", "mini-css-extract-plugin": "^2.7.6", - "pack.gl": "^0.0.19", + "pack.gl": "^0.0.22", "page.gl": "^0.0.1", "postcss-loader": "^7.3.3", "postcss-preset-env": "^9.1.2", diff --git a/script/hbs/icon.gl.css.hbs b/script/hbs/icon.gl.css.hbs deleted file mode 100644 index 3308cfb..0000000 --- a/script/hbs/icon.gl.css.hbs +++ /dev/null @@ -1,30 +0,0 @@ -/*! - * Bootstrap Icons v1.11.2 (https://icons.getbootstrap.com/) - * Copyright 2019-2023 The Bootstrap Authors - * Licensed under MIT (https://github.com/twbs/icons/blob/main/LICENSE) - */ - -@font-face { - font-display: block; - font-family: "{{ name }}"; - src: {{{ fontSrc }}}; -} - -.{{ prefix }}::before, -[class^="{{ prefix }}-"]::before, -[class*=" {{ prefix }}-"]::before { - display: inline-block; - font-family: {{ name }} !important; - font-style: normal; - font-weight: normal !important; - font-variant: normal; - text-transform: none; - line-height: 1; - vertical-align: -.125em; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -{{# each codepoints }} -.{{ ../prefix }}-{{ @key }}::before { content: "\\{{ codepoint this }}"; } -{{/ each }} \ No newline at end of file diff --git a/script/hbs/icon.gl.html.hbs b/script/hbs/icon.gl.html.hbs deleted file mode 100644 index db9db69..0000000 --- a/script/hbs/icon.gl.html.hbs +++ /dev/null @@ -1,71 +0,0 @@ - - - - - {{ name }} - - - - - - - -

{{ name }}

- - {{# each assets }} - -
- - <{{ ../tag }} class="{{ ../prefix }} {{ ../prefix }}-{{ @key }}"> - -
- {{ @key }} -
- - {{/ each }} - - - \ No newline at end of file diff --git a/script/hbs/icon.gl.sass.hbs b/script/hbs/icon.gl.sass.hbs deleted file mode 100644 index 7de2372..0000000 --- a/script/hbs/icon.gl.sass.hbs +++ /dev/null @@ -1,35 +0,0 @@ -${{ name }}-font: "{{ name }}" - -@font-face - font-family: ${{ name }}-font - src: {{{ fontSrc }}} - -{{# if selector }} -{{ selector }}:before -{{ else }} -{{ tag }}[class^="{{prefix}}-"]:before, {{ tag }}[class*=" {{prefix}}-"]:before -{{/ if }} - font-family: {{ name }} !important - font-style: normal - font-weight: normal !important - font-variant: normal - text-transform: none - line-height: 1 - -webkit-font-smoothing: antialiased - -moz-osx-font-smoothing: grayscale - - -${{ name }}-map: ( -{{# each codepoints }} - "{{ @key }}": "\\{{ codepoint this }}", -{{/ each }} -) - -{{# each codepoints }} -{{# if ../selector }} -{{ ../selector }}.{{ ../prefix }}-{{ @key }}:before -{{ else }} -{{ tag }}.{{ ../prefix }}-{{ @key }}:before -{{/ if }} - content: map-get(${{ ../name }}-map, "{{ @key }}") -{{/ each }} \ No newline at end of file diff --git a/script/hbs/icon.gl.scss.hbs b/script/hbs/icon.gl.scss.hbs deleted file mode 100644 index 62d0c2b..0000000 --- a/script/hbs/icon.gl.scss.hbs +++ /dev/null @@ -1,43 +0,0 @@ -/*! - * Bootstrap Icons v1.11.2 (https://icons.getbootstrap.com/) - * Copyright 2019-2023 The Bootstrap Authors - * Licensed under MIT (https://github.com/twbs/icons/blob/main/LICENSE) - */ - -${{ name }}-font: "{{ name }}" !default; -${{ name }}-font-dir: "{{ fontsUrl }}" !default; -${{ name }}-font-file: "#{${{ name }}-font-dir}/#{${{ name }}-font}" !default; -${{ name }}-font-hash: "24e3eb84d0bcaf83d77f904c78ac1f47" !default; -${{ name }}-font-src: url("#{${{ name }}-font-file}.woff2?#{${{ name }}-font-hash}") format("woff2"), - url("#{${{ name }}-font-file}.woff?#{${{ name }}-font-hash}") format("woff") !default; - -@font-face { - font-display: block; - font-family: ${{ name }}-font; - src: ${{ name }}-font-src; -} - -.{{ prefix }}::before, -[class^="{{ prefix }}-"]::before, -[class*=" {{ prefix }}-"]::before { - display: inline-block; - font-family: ${{ name }}-font !important; - font-style: normal; - font-weight: normal !important; - font-variant: normal; - text-transform: none; - line-height: 1; - vertical-align: -.125em; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -${{ name }}-map: ( -{{# each codepoints }} - "{{ @key }}": "\\{{ codepoint this }}", -{{/ each }} -); - -@each $icon, $codepoint in ${{ name }}-map { - .{{ prefix }}-#{$icon}::before { content: $codepoint; } -} \ No newline at end of file diff --git a/script/js/class/DirCopier.js b/script/js/class/DirCopier.js deleted file mode 100644 index 30cc9a0..0000000 --- a/script/js/class/DirCopier.js +++ /dev/null @@ -1,30 +0,0 @@ -import { __awaiter } from "tslib"; -import fs from 'fs'; -import path from 'path'; -class DirCopier { - 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 DirCopier; -//# sourceMappingURL=DirCopier.js.map \ No newline at end of file diff --git a/script/js/class/DirCopier.js.map b/script/js/class/DirCopier.js.map deleted file mode 100644 index f9091dc..0000000 --- a/script/js/class/DirCopier.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DirCopier.js","sourceRoot":"","sources":["../../ts/class/DirCopier.ts"],"names":[],"mappings":";AAqBA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAgExB,MAAM,SAAS;IAEL,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;AAMD,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/script/js/class/DirectoryCleaner.d.ts b/script/js/class/DirectoryCleaner.d.ts deleted file mode 100644 index 8b53247..0000000 --- a/script/js/class/DirectoryCleaner.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare class DirectoryCleaner { - cleanDirectory(dirPath: string): void; -} -export default DirectoryCleaner; diff --git a/script/js/class/DirectoryCleaner.js b/script/js/class/DirectoryCleaner.js deleted file mode 100644 index d365e79..0000000 --- a/script/js/class/DirectoryCleaner.js +++ /dev/null @@ -1,24 +0,0 @@ -import fs from 'fs'; -import path from 'path'; -var DirectoryCleaner = (function () { - function DirectoryCleaner() { - } - DirectoryCleaner.prototype.cleanDirectory = function (dirPath) { - var _this = this; - if (fs.existsSync(dirPath)) { - fs.readdirSync(dirPath).forEach(function (file) { - var curPath = path.join(dirPath, file); - if (fs.lstatSync(curPath).isDirectory()) { - _this.cleanDirectory(curPath); - } - else { - fs.unlinkSync(curPath); - } - }); - fs.rmdirSync(dirPath); - } - }; - return DirectoryCleaner; -}()); -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 33ea890..0000000 --- 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;IAAA;IAqBA,CAAC;IAfU,yCAAc,GAArB,UAAsB,OAAe;QAArC,iBAcC;QAbG,IAAI,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;YACzB,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,UAAA,IAAI;gBAChC,IAAM,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,KAAI,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;IACL,uBAAC;AAAD,CAAC,AArBD,IAqBC;AAOD,eAAe,gBAAgB,CAAC"} \ No newline at end of file diff --git a/script/js/class/DirectoryCopier.d.ts b/script/js/class/DirectoryCopier.d.ts deleted file mode 100644 index 5d6b9d3..0000000 --- a/script/js/class/DirectoryCopier.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare class DirectoryCopier { - copyFiles(srcDir: string, destDir: string): Promise; - recursiveCopy(srcDir: string, destDir: string): Promise; -} -export default DirectoryCopier; diff --git a/script/js/class/DirectoryCopier.js b/script/js/class/DirectoryCopier.js deleted file mode 100644 index 8cb6e7a..0000000 --- a/script/js/class/DirectoryCopier.js +++ /dev/null @@ -1,71 +0,0 @@ -import { __awaiter, __generator } from "tslib"; -import path from 'path'; -import { promises as fsPromises } from 'fs'; -var DirectoryCopier = (function () { - function DirectoryCopier() { - } - DirectoryCopier.prototype.copyFiles = function (srcDir, destDir) { - return __awaiter(this, void 0, void 0, function () { - var resolvedSrcDir, resolvedDestDir, error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - resolvedSrcDir = path.resolve(srcDir); - resolvedDestDir = path.resolve(destDir); - return [4, this.recursiveCopy(resolvedSrcDir, resolvedDestDir)]; - case 1: - _a.sent(); - console.log("Files copied from ".concat(resolvedSrcDir, " to ").concat(resolvedDestDir)); - return [3, 3]; - case 2: - error_1 = _a.sent(); - console.error('Error copying files:', error_1); - throw error_1; - case 3: return [2]; - } - }); - }); - }; - DirectoryCopier.prototype.recursiveCopy = function (srcDir, destDir) { - return __awaiter(this, void 0, void 0, function () { - var entries, _i, entries_1, entry, srcPath, destPath, _a; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: return [4, fsPromises.mkdir(destDir, { recursive: true })]; - case 1: - _b.sent(); - return [4, fsPromises.readdir(srcDir, { withFileTypes: true })]; - case 2: - entries = _b.sent(); - _i = 0, entries_1 = entries; - _b.label = 3; - case 3: - if (!(_i < entries_1.length)) return [3, 9]; - entry = entries_1[_i]; - srcPath = path.join(srcDir, entry.name); - destPath = path.join(destDir, entry.name); - if (!entry.isDirectory()) return [3, 5]; - return [4, this.recursiveCopy(srcPath, destPath)]; - case 4: - _a = _b.sent(); - return [3, 7]; - case 5: return [4, fsPromises.copyFile(srcPath, destPath)]; - case 6: - _a = _b.sent(); - _b.label = 7; - case 7: - _a; - _b.label = 8; - case 8: - _i++; - return [3, 3]; - case 9: return [2]; - } - }); - }); - }; - return DirectoryCopier; -}()); -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 797a6f9..0000000 --- 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":";AAsBA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,IAAI,CAAC;AAU5C;IAAA;IAuCA,CAAC;IA/BU,mCAAS,GAAf,UAAgB,MAAc,EAAE,OAAe;;;;;;;wBAElC,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;wBACtC,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;wBAC9C,WAAM,IAAI,CAAC,aAAa,CAAC,cAAc,EAAE,eAAe,CAAC,EAAA;;wBAAzD,SAAyD,CAAC;wBAC1D,OAAO,CAAC,GAAG,CAAC,4BAAqB,cAAc,iBAAO,eAAe,CAAE,CAAC,CAAC;;;;wBAEzE,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,OAAK,CAAC,CAAC;wBAC7C,MAAM,OAAK,CAAC;;;;;KAEnB;IAOK,uCAAa,GAAnB,UAAoB,MAAc,EAAE,OAAe;;;;;4BAC/C,WAAM,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAA;;wBAApD,SAAoD,CAAC;wBACrC,WAAM,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EAAA;;wBAAnE,OAAO,GAAG,SAAyD;8BAEhD,EAAP,mBAAO;;;6BAAP,CAAA,qBAAO,CAAA;wBAAhB,KAAK;wBACJ,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;wBACxC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;6BAEhD,KAAK,CAAC,WAAW,EAAE,EAAnB,cAAmB;wBACf,WAAM,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAA;;wBAA3C,KAAA,SAA2C,CAAA;;4BAC3C,WAAM,UAAU,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAA;;wBAA5C,KAAA,SAA4C,CAAA;;;wBAFhD,GAEiD;;;wBANnC,IAAO,CAAA;;;;;;KAQ5B;IAEL,sBAAC;AAAD,CAAC,AAvCD,IAuCC;AAOD,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/script/js/class/DirectoryCreator.d.ts b/script/js/class/DirectoryCreator.d.ts deleted file mode 100644 index 056128f..0000000 --- a/script/js/class/DirectoryCreator.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare class DirectoryCreator { - createDirectories(basePath: string, directories: string[]): Promise; -} -export default DirectoryCreator; diff --git a/script/js/class/DirectoryCreator.js b/script/js/class/DirectoryCreator.js deleted file mode 100644 index c43af76..0000000 --- a/script/js/class/DirectoryCreator.js +++ /dev/null @@ -1,27 +0,0 @@ -import { __awaiter, __generator } from "tslib"; -import fs from 'fs'; -import path from 'path'; -var DirectoryCreator = (function () { - function DirectoryCreator() { - } - DirectoryCreator.prototype.createDirectories = function (basePath, directories) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - directories.forEach(function (dir) { - var dirPath = path.join(basePath, dir); - if (!fs.existsSync(dirPath)) { - fs.mkdirSync(dirPath, { recursive: true }); - console.log("Directory created: ".concat(dirPath)); - } - else { - console.log("Directory already exists: ".concat(dirPath)); - } - }); - return [2]; - }); - }); - }; - return DirectoryCreator; -}()); -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 48ced38..0000000 --- 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;IAAA;IAwBD,CAAC;IAXS,4CAAiB,GAAvB,UAAwB,QAAgB,EAAE,WAAqB;;;gBAC3D,WAAW,CAAC,OAAO,CAAC,UAAA,GAAG;oBACnB,IAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;oBACzC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;wBAC1B,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;wBAC3C,OAAO,CAAC,GAAG,CAAC,6BAAsB,OAAO,CAAE,CAAC,CAAC;oBACjD,CAAC;yBAAM,CAAC;wBACJ,OAAO,CAAC,GAAG,CAAC,oCAA6B,OAAO,CAAE,CAAC,CAAC;oBACxD,CAAC;gBACL,CAAC,CAAC,CAAC;;;;KACN;IACL,uBAAC;AAAD,CAAC,AAxBA,IAwBA;AAOD,eAAe,gBAAgB,CAAC"} \ No newline at end of file diff --git a/script/js/class/FileCopier.d.ts b/script/js/class/FileCopier.d.ts deleted file mode 100644 index 8fc066b..0000000 --- a/script/js/class/FileCopier.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare class FileCopier { - copyFileToDirectory(srcFile: string, destDir: string): Promise; -} -export default FileCopier; diff --git a/script/js/class/FileCopier.js b/script/js/class/FileCopier.js deleted file mode 100644 index 8149b88..0000000 --- a/script/js/class/FileCopier.js +++ /dev/null @@ -1,33 +0,0 @@ -import { __awaiter, __generator } from "tslib"; -import fs from 'fs'; -import path from 'path'; -var FileCopier = (function () { - function FileCopier() { - } - FileCopier.prototype.copyFileToDirectory = function (srcFile, destDir) { - return __awaiter(this, void 0, void 0, function () { - var fileName, destFilePath, error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - fileName = path.basename(srcFile); - destFilePath = path.join(destDir, fileName); - return [4, fs.promises.copyFile(srcFile, destFilePath)]; - case 1: - _a.sent(); - console.log("File copied from ".concat(srcFile, " to ").concat(destFilePath)); - return [3, 3]; - case 2: - error_1 = _a.sent(); - console.error('Error copying file:', error_1); - throw error_1; - case 3: return [2]; - } - }); - }); - }; - return FileCopier; -}()); -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 526ac2a..0000000 --- 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;IAAA;IAuBD,CAAC;IAfS,wCAAmB,GAAzB,UACI,OAAe,EACf,OAAe;;;;;;;wBAGL,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;wBAClC,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;wBAClD,WAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC,EAAA;;wBAAjD,SAAiD,CAAC;wBAClD,OAAO,CAAC,GAAG,CAAC,2BAAoB,OAAO,iBAAO,YAAY,CAAE,CAAC,CAAC;;;;wBAE9D,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE,OAAK,CAAC,CAAC;wBAC5C,MAAM,OAAK,CAAC;;;;;KAEnB;IAEL,iBAAC;AAAD,CAAC,AAvBA,IAuBA;AAOD,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/script/js/class/FileRenamer.d.ts b/script/js/class/FileRenamer.d.ts deleted file mode 100644 index 743f7f1..0000000 --- a/script/js/class/FileRenamer.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare class FileRenamer { - renameFile(srcPath: string, targetPath: string): Promise; -} -export default FileRenamer; diff --git a/script/js/class/FileRenamer.js b/script/js/class/FileRenamer.js deleted file mode 100644 index feb105d..0000000 --- a/script/js/class/FileRenamer.js +++ /dev/null @@ -1,30 +0,0 @@ -import { __awaiter, __generator } from "tslib"; -import fs from 'fs'; -var FileRenamer = (function () { - function FileRenamer() { - } - FileRenamer.prototype.renameFile = function (srcPath, targetPath) { - return __awaiter(this, void 0, void 0, function () { - var error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - return [4, fs.promises.rename(srcPath, targetPath)]; - case 1: - _a.sent(); - console.log("File renamed from ".concat(srcPath, " to ").concat(targetPath)); - return [3, 3]; - case 2: - error_1 = _a.sent(); - console.error('Error renaming file:', error_1); - throw error_1; - case 3: return [2]; - } - }); - }); - }; - return FileRenamer; -}()); -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 e26f328..0000000 --- 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;IAAA;IAkBD,CAAC;IAVU,gCAAU,GAAhB,UAAiB,OAAe,EAAE,UAAkB;;;;;;;wBAE7C,WAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,EAAA;;wBAA7C,SAA6C,CAAC;wBAC9C,OAAO,CAAC,GAAG,CAAC,4BAAqB,OAAO,iBAAO,UAAU,CAAE,CAAC,CAAC;;;;wBAE7D,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,OAAK,CAAC,CAAC;wBAC7C,MAAM,OAAK,CAAC;;;;;KAEnB;IAEL,kBAAC;AAAD,CAAC,AAlBA,IAkBA;AAOD,eAAe,WAAW,CAAC"} \ No newline at end of file diff --git a/script/js/class/FontGenerator.d.ts b/script/js/class/FontGenerator.d.ts deleted file mode 100644 index 64c1576..0000000 --- a/script/js/class/FontGenerator.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare class FontGenerator { - generateFonts(sourceDirectory: string, outputDiectory: string): Promise; -} -export default FontGenerator; diff --git a/script/js/class/FontGenerator.js b/script/js/class/FontGenerator.js deleted file mode 100644 index 3989c5e..0000000 --- a/script/js/class/FontGenerator.js +++ /dev/null @@ -1,65 +0,0 @@ -import { __awaiter, __generator } from "tslib"; -import { generateFonts, FontAssetType, OtherAssetType } from 'fantasticon'; -var FontGenerator = (function () { - function FontGenerator() { - } - FontGenerator.prototype.generateFonts = function (sourceDirectory, outputDiectory) { - return __awaiter(this, void 0, void 0, function () { - var config, error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - config = { - inputDir: sourceDirectory, - outputDir: outputDiectory, - name: 'unit.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/unit.gl.json', - css: './dist/font/unit.gl.css', - scss: './dist/font/unit.gl.scss', - woff: './dist/font/unit.gl.woff', - woff2: './dist/font/unit.gl.woff2', - }, - selector: '.igl', - prefix: 'igl', - fontsUrl: './fonts', - }; - _a.label = 1; - case 1: - _a.trys.push([1, 3, , 4]); - return [4, generateFonts(config)]; - case 2: - _a.sent(); - console.log('Fonts generated successfully.'); - return [3, 4]; - case 3: - error_1 = _a.sent(); - console.error('Error generating fonts:', error_1); - return [3, 4]; - case 4: return [2]; - } - }); - }); - }; - return FontGenerator; -}()); -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 3da9cc9..0000000 --- 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;IAAA;IAiGA,CAAC;IA/FS,qCAAa,GAAnB,UAAoB,eAAuB,EAAE,cAAsB;;;;;;wBAEzD,MAAM,GAAG;4BAIX,QAAQ,EAAE,eAAe;4BACzB,SAAS,EAAE,cAAc;4BAGzB,IAAI,EAAE,SAAS;4BACf,SAAS,EAAE;gCACP,aAAa,CAAC,GAAG;gCACjB,aAAa,CAAC,IAAI;gCAClB,aAAa,CAAC,KAAK;gCACnB,aAAa,CAAC,GAAG;gCACjB,aAAa,CAAC,GAAG;6BACpB;4BACD,UAAU,EAAE;gCACR,cAAc,CAAC,GAAG;gCAClB,cAAc,CAAC,IAAI;gCACnB,cAAc,CAAC,IAAI;gCACnB,cAAc,CAAC,IAAI;gCACnB,cAAc,CAAC,IAAI;gCACnB,cAAc,CAAC,EAAE;6BACpB;4BAID,aAAa,EAAE;gCAOf,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;6BAalB;4BACL,WAAW,EAAE;gCACT,IAAI,EAAI,0BAA0B;gCAClC,GAAG,EAAK,yBAAyB;gCACjC,IAAI,EAAI,0BAA0B;gCAClC,IAAI,EAAI,0BAA0B;gCAClC,KAAK,EAAG,2BAA2B;6BACtC;4BAWD,QAAQ,EAAE,MAAM;4BAOhB,MAAM,EAAE,KAAK;4BACb,QAAQ,EAAE,SAAS;yBAWlB,CAAC;;;;wBAGE,WAAM,aAAa,CAAC,MAAM,CAAC,EAAA;;wBAA3B,SAA2B,CAAC;wBAC5B,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;;;;wBAE7C,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,OAAK,CAAC,CAAC;;;;;;KAEvD;IACL,oBAAC;AAAD,CAAC,AAjGD,IAiGC;AAOD,eAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/script/js/class/JavaScriptMinifier.d.ts b/script/js/class/JavaScriptMinifier.d.ts deleted file mode 100644 index dc71883..0000000 --- a/script/js/class/JavaScriptMinifier.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare class JavaScriptMinifier { - private config; - constructor(config: any); - minifyFile(inputPath: string, outputPath: string): Promise; -} -export default JavaScriptMinifier; diff --git a/script/js/class/JavaScriptMinifier.js b/script/js/class/JavaScriptMinifier.js deleted file mode 100644 index 8b71684..0000000 --- a/script/js/class/JavaScriptMinifier.js +++ /dev/null @@ -1,40 +0,0 @@ -import { __awaiter, __generator } from "tslib"; -import { minify } from 'terser'; -import { promises as fs } from 'fs'; -var JavaScriptMinifier = (function () { - function JavaScriptMinifier(config) { - this.config = config; - } - JavaScriptMinifier.prototype.minifyFile = function (inputPath, outputPath) { - return __awaiter(this, void 0, void 0, function () { - var inputCode, result, error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 6, , 7]); - return [4, fs.readFile(inputPath, 'utf8')]; - case 1: - inputCode = _a.sent(); - return [4, minify(inputCode, this.config)]; - case 2: - result = _a.sent(); - if (!result.code) return [3, 4]; - return [4, fs.writeFile(outputPath, result.code)]; - case 3: - _a.sent(); - return [3, 5]; - case 4: throw new Error('Minification resulted in empty output.'); - case 5: return [3, 7]; - case 6: - error_1 = _a.sent(); - console.error("Error minifying JavaScript file ".concat(inputPath, ":"), error_1); - throw error_1; - case 7: return [2]; - } - }); - }); - }; - return JavaScriptMinifier; -}()); -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 04765e8..0000000 --- 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;IAQG,4BAAY,MAAW;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAQK,uCAAU,GAAhB,UACI,SAAiB,EACjB,UAAkB;;;;;;;wBAMI,WAAM,EAAE,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,EAAA;;wBAAhD,SAAS,GAAG,SAAoC;wBAGvC,WAAM,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,EAAA;;wBAA7C,MAAM,GAAG,SAAoC;6BAE/C,MAAM,CAAC,IAAI,EAAX,cAAW;wBACX,WAAM,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,EAAA;;wBAA3C,SAA2C,CAAC;;4BAE5C,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;;;;wBAG9D,OAAO,CAAC,KAAK,CAAC,0CAAmC,SAAS,MAAG,EAAE,OAAK,CAAC,CAAC;wBACtE,MAAM,OAAK,CAAC;;;;;KAEnB;IAEL,yBAAC;AAAD,CAAC,AA1CA,IA0CA;AAOD,eAAe,kBAAkB,CAAC"} \ No newline at end of file diff --git a/script/js/class/ModulePackager.js b/script/js/class/ModulePackager.js deleted file mode 100644 index 2815e9c..0000000 --- a/script/js/class/ModulePackager.js +++ /dev/null @@ -1,41 +0,0 @@ -class ModulePackager { - constructor(svgs, version) { - if (!svgs || !version) { - throw new Error("Invalid constructor arguments"); - } - this.svgs = svgs; - this.version = version; - } - getSVGContent(source) { - return source.slice(source.indexOf('>') + 1).slice(0, -6); - } - createModulePackage() { - try { - const files = this.svgs.map(svg => { - const source = this.getSVGContent(svg.source); - const json = JSON.stringify(Object.assign(Object.assign({}, svg), { source })); - return { - filepath: `${svg.metadata.name}.js`, - source: `export default ${json};` - }; - }); - files.push({ - filepath: 'package.json', - source: `{ - "name": "@acme/module-icons", - "version": "${this.version}" - }` - }); - return { - name: 'module-icons', - files - }; - } - catch (error) { - console.error('Error creating module package:', error); - throw error; - } - } -} -export default ModulePackager; -//# sourceMappingURL=ModulePackager.js.map \ No newline at end of file diff --git a/script/js/class/ModulePackager.js.map b/script/js/class/ModulePackager.js.map deleted file mode 100644 index ce58b13..0000000 --- a/script/js/class/ModulePackager.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ModulePackager.js","sourceRoot":"","sources":["../../ts/class/ModulePackager.ts"],"names":[],"mappings":"AA2BA,MAAM,cAAc;IAKhB,YAAY,IAAW,EAAE,OAAe;QACpC,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACrD,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAEO,aAAa,CAAC,MAAc;QAEhC,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9D,CAAC;IAEM,mBAAmB;QACtB,IAAI,CAAC;YACD,MAAM,KAAK,GAAW,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBAC1C,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBAC9C,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,iCAAM,GAAG,KAAE,MAAM,IAAG,CAAC;gBAEhD,OAAO;oBACH,QAAQ,EAAE,GAAG,GAAG,CAAC,QAAQ,CAAC,IAAI,KAAK;oBACnC,MAAM,EAAE,kBAAkB,IAAI,GAAG;iBACpC,CAAC;YACF,CAAC,CAAC,CAAC;YAEH,KAAK,CAAC,IAAI,CAAC;gBACP,QAAQ,EAAE,cAAc;gBACxB,MAAM,EAAE;;kCAEU,IAAI,CAAC,OAAO;kBAC5B;aACL,CAAC,CAAC;YAEH,OAAO;gBACH,IAAI,EAAE,cAAc;gBACpB,KAAK;aACR,CAAC;QACN,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,gCAAgC,EAAE,KAAK,CAAC,CAAC;YACvD,MAAM,KAAK,CAAC;QAChB,CAAC;IACL,CAAC;CACJ;AAOC,eAAe,cAAc,CAAC"} \ No newline at end of file diff --git a/script/js/class/PackageCreator.d.ts b/script/js/class/PackageCreator.d.ts deleted file mode 100644 index bed8194..0000000 --- a/script/js/class/PackageCreator.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare class PackageCreator { - config: any; - private static defaultConfig; - constructor(customConfig?: any); - createPackageJson(outputDir: string): Promise; - private ensureDirectoryExists; -} -export default PackageCreator; diff --git a/script/js/class/PackageCreator.js b/script/js/class/PackageCreator.js deleted file mode 100644 index d621ae1..0000000 --- a/script/js/class/PackageCreator.js +++ /dev/null @@ -1,73 +0,0 @@ -import { __assign, __awaiter, __generator } from "tslib"; -import fs from 'fs/promises'; -import path from 'path'; -import packageConfig from "../config/package.config.js"; -var PackageCreator = (function () { - function PackageCreator(customConfig) { - if (customConfig === void 0) { customConfig = {}; } - var newConfig = { - name: customConfig.name, - version: customConfig.version, - description: customConfig.description, - keywords: customConfig.keywords, - license: customConfig.license, - homepage: customConfig.homepage, - dependencies: customConfig.dependencies, - }; - this.config = __assign(__assign({}, PackageCreator.defaultConfig), newConfig); - } - PackageCreator.prototype.createPackageJson = function (outputDir) { - return __awaiter(this, void 0, void 0, function () { - var filePath, data, error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - filePath = path.join(outputDir, 'package.json'); - data = JSON.stringify(this.config, null, 2); - _a.label = 1; - case 1: - _a.trys.push([1, 4, , 5]); - return [4, this.ensureDirectoryExists(outputDir)]; - case 2: - _a.sent(); - return [4, fs.writeFile(filePath, data, 'utf-8')]; - case 3: - _a.sent(); - console.log("package.json created at ".concat(filePath)); - return [3, 5]; - case 4: - error_1 = _a.sent(); - console.error("Error creating package.json: ".concat(error_1)); - throw error_1; - case 5: return [2]; - } - }); - }); - }; - PackageCreator.prototype.ensureDirectoryExists = function (dirPath) { - return __awaiter(this, void 0, void 0, function () { - var error_2; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - return [4, fs.mkdir(dirPath, { recursive: true })]; - case 1: - _a.sent(); - return [3, 3]; - case 2: - error_2 = _a.sent(); - if (error_2 instanceof Error && error_2.code !== 'EEXIST') { - throw error_2; - } - return [3, 3]; - case 3: return [2]; - } - }); - }); - }; - PackageCreator.defaultConfig = packageConfig; - return PackageCreator; -}()); -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 44c81d1..0000000 --- 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,aAAa,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,aAAa,MAAM,6BAA6B,CAAA;AAStD;IAqBI,wBACG,YAAsB;QAAtB,6BAAA,EAAA,iBAAsB;QAItB,IAAI,SAAS,GAAG;YAEZ,IAAI,EAAE,YAAY,CAAC,IAAI;YACvB,OAAO,EAAE,YAAY,CAAC,OAAO;YAC7B,WAAW,EAAE,YAAY,CAAC,WAAW;YACrC,QAAQ,EAAE,YAAY,CAAC,QAAQ;YAC/B,OAAO,EAAE,YAAY,CAAC,OAAO;YAC7B,QAAQ,EAAE,YAAY,CAAC,QAAQ;YAE/B,YAAY,EAAE,YAAY,CAAC,YAAY;SAU1C,CAAA;QAEA,IAAI,CAAC,MAAM,yBACJ,cAAc,CAAC,aAAa,GAC5B,SAAS,CACf,CAAC;IACN,CAAC;IA2CK,0CAAiB,GAAvB,UAAwB,SAAiB;;;;;;wBAChC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;wBAChD,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;;;;wBAI9C,WAAM,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,EAAA;;wBAA3C,SAA2C,CAAC;wBAG5C,WAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,EAAA;;wBAA3C,SAA2C,CAAC;wBAC5C,OAAO,CAAC,GAAG,CAAC,kCAA2B,QAAQ,CAAE,CAAC,CAAC;;;;wBAEnD,OAAO,CAAC,KAAK,CAAC,uCAAgC,OAAK,CAAE,CAAC,CAAC;wBACvD,MAAM,OAAK,CAAC;;;;;KAEnB;IAMc,8CAAqB,GAAnC,UAAoC,OAAe;;;;;;;wBAE5C,WAAM,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAA;;wBAA5C,SAA4C,CAAC;;;;wBAG7C,IAAI,OAAK,YAAY,KAAK,IAAK,OAA+B,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;4BAC/E,MAAM,OAAK,CAAC;wBAChB,CAAC;;;;;;KAER;IA9GgB,4BAAa,GAAQ,aAAa,CAAC;IAgHxD,qBAAC;CAAA,AA9HA,IA8HA;AAOD,eAAe,cAAc,CAAC"} \ No newline at end of file diff --git a/script/js/class/StyleProcessor.d.ts b/script/js/class/StyleProcessor.d.ts deleted file mode 100644 index 7683aad..0000000 --- a/script/js/class/StyleProcessor.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/// -import postcss from 'postcss'; -import fs from 'fs'; -declare class StyleProcessor { - processPostCSS(css: string, styleOption: 'expanded' | 'compressed'): Promise>; - processStyles(inputFile: string, outputFile: fs.PathOrFileDescriptor, styleOption: 'expanded' | 'compressed'): Promise; -} -export default StyleProcessor; diff --git a/script/js/class/StyleProcessor.js b/script/js/class/StyleProcessor.js deleted file mode 100644 index d35b053..0000000 --- a/script/js/class/StyleProcessor.js +++ /dev/null @@ -1,49 +0,0 @@ -import { __awaiter, __generator } 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'; -var StyleProcessor = (function () { - function StyleProcessor() { - } - StyleProcessor.prototype.processPostCSS = function (css, styleOption) { - return __awaiter(this, void 0, void 0, function () { - var config; - return __generator(this, function (_a) { - config = styleOption === 'expanded' ? postcssConfigExpanded : postcssConfigCompressed; - return [2, postcss(config.plugins).process(css, { from: undefined, map: { inline: false } })]; - }); - }); - }; - StyleProcessor.prototype.processStyles = function (inputFile, outputFile, styleOption) { - return __awaiter(this, void 0, void 0, function () { - var result, processed, err_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 3, , 4]); - return [4, sass.compileAsync(inputFile, { style: styleOption })]; - case 1: - result = _a.sent(); - return [4, this.processPostCSS(result.css, styleOption)]; - case 2: - processed = _a.sent(); - fs.writeFileSync(outputFile, processed.css); - if (processed.map) { - fs.writeFileSync("".concat(outputFile, ".map"), processed.map.toString()); - } - return [3, 4]; - case 3: - err_1 = _a.sent(); - console.error("Error processing styles from ".concat(inputFile, ":"), err_1); - return [3, 4]; - case 4: return [2]; - } - }); - }); - }; - return StyleProcessor; -}()); -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 1b1f1cf..0000000 --- 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;IAAA;IAoDA,CAAC;IA5CS,uCAAc,GAApB,UACI,GAAW,EACX,WAAsC;;;;gBAEhC,MAAM,GAAG,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,uBAAuB,CAAC;gBAC5F,WAAO,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,EAAC;;;KAC5F;IAQK,sCAAa,GAAnB,UACI,SAAiB,EACjB,UAAmC,EACnC,WAAsC;;;;;;;wBAKnB,WAAM,IAAI,CAAC,YAAY,CAClC,SAAS,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,CACpC,EAAA;;wBAFK,MAAM,GAAG,SAEd;wBAGiB,WAAM,IAAI,CAAC,cAAc,CACvC,MAAM,CAAC,GAAG,EACV,WAAW,CACd,EAAA;;wBAHK,SAAS,GAAG,SAGjB;wBAGD,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;wBAG5C,IAAI,SAAS,CAAC,GAAG,EAAE,CAAC;4BAChB,EAAE,CAAC,aAAa,CAAC,UAAG,UAAU,SAAM,EAAE,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;wBACpE,CAAC;;;;wBAGD,OAAO,CAAC,KAAK,CAAC,uCAAgC,SAAS,MAAG,EAAE,KAAG,CAAC,CAAC;;;;;;KAExE;IACL,qBAAC;AAAD,CAAC,AApDD,IAoDC;AAOD,eAAe,cAAc,CAAC"} \ No newline at end of file diff --git a/script/js/class/SvgPackager.d.ts b/script/js/class/SvgPackager.d.ts deleted file mode 100644 index 9b19f5f..0000000 --- a/script/js/class/SvgPackager.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -declare class SvgPackager { - processSvgFiles(directory: string, outputDirectory: string, ts_output_directory: string, json_output_directory: string): Promise; - private readSvgFile; - private sanitizeFileName; - private optimizeSvg; - private writeTypeScriptFile; - private writeSvgFile; - private writeIconsJson; -} -export default SvgPackager; diff --git a/script/js/class/SvgPackager.js b/script/js/class/SvgPackager.js deleted file mode 100644 index 975dda3..0000000 --- a/script/js/class/SvgPackager.js +++ /dev/null @@ -1,183 +0,0 @@ -import { __assign, __awaiter, __generator } from "tslib"; -import * as fs_extra from 'fs-extra'; -import { promises as fs } from 'fs'; -import * as glob from 'glob'; -import * as path from 'path'; -import { fileURLToPath } from "url"; -import SVGO from 'svgo'; -import { loadConfig } from 'svgo'; -var __filename = fileURLToPath(import.meta.url); -var __dirname = path.dirname(__filename); -var SvgPackager = (function () { - function SvgPackager() { - } - SvgPackager.prototype.processSvgFiles = function (directory, outputDirectory, ts_output_directory, json_output_directory) { - return __awaiter(this, void 0, void 0, function () { - var iconNames, svgFiles, _i, svgFiles_1, file, iconName, svgContent, optimizedSvg, resultSvg, error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - iconNames = []; - _a.label = 1; - case 1: - _a.trys.push([1, 10, , 11]); - console.log("Processing directory: ".concat(directory)); - svgFiles = glob.sync("".concat(directory, "/**/*.svg")); - _i = 0, svgFiles_1 = svgFiles; - _a.label = 2; - case 2: - if (!(_i < svgFiles_1.length)) return [3, 8]; - file = svgFiles_1[_i]; - console.log("Processing file: ".concat(file)); - iconName = this.sanitizeFileName(path.basename(file, '.svg')); - iconNames.push(iconName); - console.log("Processing icon: ".concat(iconName)); - return [4, this.readSvgFile(file)]; - case 3: - svgContent = _a.sent(); - return [4, this.optimizeSvg(file, svgContent)]; - case 4: - optimizedSvg = _a.sent(); - resultSvg = optimizedSvg.trim(); - return [4, this.writeSvgFile(file, iconName, resultSvg, outputDirectory)]; - case 5: - _a.sent(); - return [4, this.writeTypeScriptFile(file, iconName, resultSvg, ts_output_directory)]; - case 6: - _a.sent(); - _a.label = 7; - case 7: - _i++; - return [3, 2]; - case 8: return [4, this.writeIconsJson(iconNames, json_output_directory)]; - case 9: - _a.sent(); - console.log("Successfully processed ".concat(svgFiles.length, " SVG files.")); - return [3, 11]; - case 10: - error_1 = _a.sent(); - console.error('Error processing SVG files:', error_1); - throw error_1; - case 11: return [2]; - } - }); - }); - }; - SvgPackager.prototype.readSvgFile = function (filePath) { - return __awaiter(this, void 0, void 0, function () { - var absolutePath, svgContent, error_2; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - absolutePath = path.resolve(filePath); - return [4, fs.readFile(absolutePath, 'utf8')]; - case 1: - svgContent = _a.sent(); - return [2, svgContent]; - case 2: - error_2 = _a.sent(); - console.error('Error reading file:', filePath, error_2); - throw error_2; - case 3: return [2]; - } - }); - }); - }; - SvgPackager.prototype.sanitizeFileName = function (fileName) { - return fileName.replace(/[^a-zA-Z0-9_]/g, '_'); - }; - SvgPackager.prototype.optimizeSvg = function (filePath, svgContent) { - return __awaiter(this, void 0, void 0, function () { - var config, result, error_3; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 3, , 4]); - return [4, loadConfig(path.join(__dirname, '../config/svgo.config.js'))]; - case 1: - config = _a.sent(); - return [4, SVGO.optimize(svgContent, __assign({ path: filePath }, config))]; - case 2: - result = _a.sent(); - return [2, result.data]; - case 3: - error_3 = _a.sent(); - console.error('Error optimizing SVG:', error_3); - throw error_3; - case 4: return [2]; - } - }); - }); - }; - SvgPackager.prototype.writeTypeScriptFile = function (filePath, iconName, svgContent, outputDirectory) { - return __awaiter(this, void 0, void 0, function () { - var tsContent, outputPath, error_4; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - tsContent = "export const icon_".concat(iconName, " = `").concat(svgContent, "`;\n"); - outputPath = path.join(outputDirectory, "".concat(iconName, ".ts")); - return [4, fs_extra.outputFile(outputPath, tsContent)]; - case 1: - _a.sent(); - return [3, 3]; - case 2: - error_4 = _a.sent(); - console.error("Error creating TypeScript file for ".concat(filePath, ":"), error_4); - throw error_4; - case 3: return [2]; - } - }); - }); - }; - SvgPackager.prototype.writeSvgFile = function (filePath, iconName, svgContent, outputDirectory) { - return __awaiter(this, void 0, void 0, function () { - var outputPath, error_5; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - outputPath = path.join(outputDirectory, "".concat(iconName, ".svg")); - return [4, fs_extra.outputFile(outputPath, svgContent)]; - case 1: - _a.sent(); - console.log("SVG file written successfully for ".concat(iconName)); - return [3, 3]; - case 2: - error_5 = _a.sent(); - console.error("Error writing SVG file for ".concat(iconName, ":"), error_5); - throw error_5; - case 3: return [2]; - } - }); - }); - }; - SvgPackager.prototype.writeIconsJson = function (iconNames, outputDirectory) { - return __awaiter(this, void 0, void 0, function () { - var jsonContent, outputPath, error_6; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - jsonContent = JSON.stringify(iconNames, null, 2); - outputPath = path.join(outputDirectory, 'icons.json'); - return [4, fs_extra.outputFile(outputPath, jsonContent)]; - case 1: - _a.sent(); - console.log('Icons JSON file created successfully'); - return [3, 3]; - case 2: - error_6 = _a.sent(); - console.error('Error writing icons JSON file:', error_6); - throw error_6; - case 3: return [2]; - } - }); - }); - }; - return SvgPackager; -}()); -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 e606c5a..0000000 --- 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":";AAsBA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAGlC,IAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAGlD,IAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAW3C;IAAA;IAgLA,CAAC;IAzKgB,qCAAe,GAA5B,UACI,SAAiB,EACjB,eAAuB,EACvB,mBAA2B,EAC3B,qBAA6B;;;;;;wBAGvB,SAAS,GAAa,EAAE,CAAC;;;;wBAG3B,OAAO,CAAC,GAAG,CAAC,gCAAyB,SAAS,CAAE,CAAC,CAAC;wBAE5C,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,UAAG,SAAS,cAAW,CAAC,CAAC;8BAEzB,EAAR,qBAAQ;;;6BAAR,CAAA,sBAAQ,CAAA;wBAAhB,IAAI;wBACX,OAAO,CAAC,GAAG,CAAC,2BAAoB,IAAI,CAAE,CAAC,CAAC;wBAClC,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;wBACpE,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;wBACzB,OAAO,CAAC,GAAG,CAAC,2BAAoB,QAAQ,CAAE,CAAC,CAAC;wBACzB,WAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAA;;wBAAzC,UAAU,GAAG,SAA4B;wBAC1B,WAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,UAAU,CAAC,EAAA;;wBAAvD,YAAY,GAAG,SAAwC;wBAEvD,SAAS,GAAG,YAAY,CAAC,IAAI,EAAE,CAAA;wBAErC,WAAM,IAAI,CAAC,YAAY,CACnB,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,eAAe,CAClB,EAAA;;wBALD,SAKC,CAAC;wBAEF,WAAM,IAAI,CAAC,mBAAmB,CAC1B,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,mBAAmB,CACtB,EAAA;;wBALD,SAKC,CAAC;;;wBAtBa,IAAQ,CAAA;;4BAwB3B,WAAM,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,qBAAqB,CAAC,EAAA;;wBAA3D,SAA2D,CAAC;wBAC5D,OAAO,CAAC,GAAG,CAAC,iCAA0B,QAAQ,CAAC,MAAM,gBAAa,CAAC,CAAC;;;;wBAEpE,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,OAAK,CAAC,CAAC;wBACpD,MAAM,OAAK,CAAC;;;;;KAEnB;IAOa,iCAAW,GAAzB,UAA0B,QAAgB;;;;;;;wBAE5B,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;wBACzB,WAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC,EAAA;;wBAApD,UAAU,GAAG,SAAuC;wBAC1D,WAAO,UAAU,EAAC;;;wBAElB,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE,QAAQ,EAAE,OAAK,CAAC,CAAC;wBACtD,MAAM,OAAK,CAAC;;;;;KAEnB;IAOO,sCAAgB,GAAxB,UAAyB,QAAgB;QAEjC,OAAO,QAAQ,CAAC,OAAO,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC;IACvD,CAAC;IAOa,iCAAW,GAAzB,UACI,QAAgB,EAChB,UAAkB;;;;;;;wBAKC,WAAM,UAAU,CAC3B,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,0BAA0B,CAAC,CACnD,EAAA;;wBAFK,MAAM,GAAG,SAEd;wBAEc,WAAM,IAAI,CAAC,QAAQ,CAC9B,UAAU,aACR,IAAI,EAAE,QAAQ,IAAK,MAAM,EAC9B,EAAA;;wBAHK,MAAM,GAAG,SAGd;wBAED,WAAO,MAAM,CAAC,IAAI,EAAC;;;wBAEnB,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,OAAK,CAAC,CAAC;wBAC9C,MAAM,OAAK,CAAC;;;;;KAEnB;IAQc,yCAAmB,GAAjC,UACG,QAAgB,EAChB,QAAgB,EAChB,UAAkB,EAClB,eAAuB;;;;;;;wBAGb,SAAS,GAAG,4BAAqB,QAAQ,iBAAQ,UAAU,SAAO,CAAC;wBACnE,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,UAAG,QAAQ,QAAK,CAAC,CAAC;wBAChE,WAAM,QAAQ,CAAC,UAAU,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA;;wBAAhD,SAAgD,CAAC;;;;wBAEjD,OAAO,CAAC,KAAK,CAAC,6CAAsC,QAAQ,MAAG,EAAE,OAAK,CAAC,CAAC;wBACxE,MAAM,OAAK,CAAC;;;;;KAEnB;IAQa,kCAAY,GAA1B,UACI,QAAgB,EAChB,QAAgB,EAChB,UAAkB,EAClB,eAAuB;;;;;;;wBAGb,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,UAAG,QAAQ,SAAM,CAAC,CAAC;wBACjE,WAAM,QAAQ,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,EAAA;;wBAAjD,SAAiD,CAAC;wBAClD,OAAO,CAAC,GAAG,CAAC,4CAAqC,QAAQ,CAAE,CAAC,CAAC;;;;wBAE7D,OAAO,CAAC,KAAK,CAAC,qCAA8B,QAAQ,MAAG,EAAE,OAAK,CAAC,CAAC;wBAChE,MAAM,OAAK,CAAC;;;;;KAEnB;IAWa,oCAAc,GAA5B,UACI,SAAmB,EACnB,eAAuB;;;;;;;wBAIb,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;wBACjD,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;wBAC5D,WAAM,QAAQ,CAAC,UAAU,CAAC,UAAU,EAAE,WAAW,CAAC,EAAA;;wBAAlD,SAAkD,CAAC;wBACnD,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;;;;wBAEpD,OAAO,CAAC,KAAK,CAAC,gCAAgC,EAAE,OAAK,CAAC,CAAC;wBACvD,MAAM,OAAK,CAAC;;;;;KAEnB;IAEL,kBAAC;AAAD,CAAC,AAhLD,IAgLC;AAOD,eAAe,WAAW,CAAC"} \ No newline at end of file diff --git a/script/js/class/SvgSpriteGenerator.d.ts b/script/js/class/SvgSpriteGenerator.d.ts deleted file mode 100644 index b958692..0000000 --- a/script/js/class/SvgSpriteGenerator.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare class SvgSpriteGenerator { - private config; - constructor(config: any); - generateSprite(sourceDir: string, outputDir: string): Promise; -} -export default SvgSpriteGenerator; diff --git a/script/js/class/SvgSpriteGenerator.js b/script/js/class/SvgSpriteGenerator.js deleted file mode 100644 index 1135f53..0000000 --- a/script/js/class/SvgSpriteGenerator.js +++ /dev/null @@ -1,46 +0,0 @@ -import { __awaiter, __generator } from "tslib"; -import svgSprite from 'svg-sprite'; -import fs from 'fs'; -import path from 'path'; -var SvgSpriteGenerator = (function () { - function SvgSpriteGenerator(config) { - this.config = config; - } - SvgSpriteGenerator.prototype.generateSprite = function (sourceDir, outputDir) { - return __awaiter(this, void 0, void 0, function () { - var files, sprite_1; - return __generator(this, function (_a) { - try { - files = fs.readdirSync(sourceDir); - sprite_1 = new svgSprite(this.config); - files.forEach(function (file) { - if (path.extname(file) === '.svg') { - var svgPath = path.resolve(sourceDir, file); - var content = fs.readFileSync(svgPath, 'utf8'); - sprite_1.add(svgPath, null, content); - } - }); - sprite_1.compile(function (error, result) { - if (error) { - throw error; - } - for (var mode in result) { - for (var resource in result[mode]) { - var 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); - } - return [2]; - }); - }); - }; - return SvgSpriteGenerator; -}()); -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 908812b..0000000 --- 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;IAQI,4BAAY,MAAW;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAOK,2CAAc,GAApB,UAAqB,SAAiB,EAAE,SAAiB;;;;gBACrD,IAAI,CAAC;oBACK,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;oBAClC,WAAS,IAAI,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBAE1C,KAAK,CAAC,OAAO,CAAC,UAAA,IAAI;wBACd,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,MAAM,EAAE,CAAC;4BAChC,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;4BAC9C,IAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;4BACjD,QAAM,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;wBACvC,CAAC;oBACL,CAAC,CAAC,CAAC;oBAEH,QAAM,CAAC,OAAO,CAAC,UAAC,KAAK,EAAE,MAAM;wBACzB,IAAI,KAAK,EAAE,CAAC;4BACR,MAAM,KAAK,CAAC;wBAChB,CAAC;wBAED,KAAK,IAAM,IAAI,IAAI,MAAM,EAAE,CAAC;4BACxB,KAAK,IAAM,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;gCAClC,IAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAC3B,SAAS,EACT,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAC9B,CAAC;gCACF,EAAE,CAAC,SAAS,CACR,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EACxB,EAAE,SAAS,EAAE,IAAI,EAAE,CACtB,CAAC;gCACF,EAAE,CAAC,aAAa,CACZ,UAAU,EACV,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAClC,CAAC;4BACN,CAAC;wBACL,CAAC;oBACL,CAAC,CAAC,CAAC;gBAEP,CAAC;gBAAC,OAAO,GAAG,EAAE,CAAC;oBACX,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,GAAG,CAAC,CAAC;gBACvD,CAAC;;;;KACJ;IACL,yBAAC;AAAD,CAAC,AAzDD,IAyDC;AAOD,eAAe,kBAAkB,CAAC"} \ No newline at end of file diff --git a/script/js/class/TypeScriptCompiler.d.ts b/script/js/class/TypeScriptCompiler.d.ts deleted file mode 100644 index daa5eb4..0000000 --- a/script/js/class/TypeScriptCompiler.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare class TypeScriptCompiler { - private config; - private static defaultConfig; - constructor(customConfig?: any); - compile(filePaths: string[], outDir: string): Promise; -} -export default TypeScriptCompiler; diff --git a/script/js/class/TypeScriptCompiler.js b/script/js/class/TypeScriptCompiler.js deleted file mode 100644 index 823f04f..0000000 --- a/script/js/class/TypeScriptCompiler.js +++ /dev/null @@ -1,42 +0,0 @@ -import { __assign } from "tslib"; -import ts from 'typescript'; -import tsConfig from "../config/ts.config.js"; -var TypeScriptCompiler = (function () { - function TypeScriptCompiler(customConfig) { - if (customConfig === void 0) { customConfig = {}; } - this.config = __assign(__assign({}, TypeScriptCompiler.defaultConfig), customConfig); - } - TypeScriptCompiler.prototype.compile = function (filePaths, outDir) { - var _this = this; - return new Promise(function (resolve, reject) { - var options = __assign({ module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2015, outDir: outDir }, _this.config); - var host = ts.createCompilerHost(options); - var program = ts.createProgram(filePaths, options, host); - var emitResult = program.emit(); - var allDiagnostics = ts.getPreEmitDiagnostics(program).concat(emitResult.diagnostics); - allDiagnostics.forEach(function (diagnostic) { - if (diagnostic.file) { - var _a = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start), line = _a.line, character = _a.character; - var message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); - console.error("".concat(diagnostic.file.fileName, " (").concat(line + 1, ",").concat(character + 1, "): ").concat(message)); - } - else { - console.error(ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n')); - } - }); - var 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')); - } - }); - }; - TypeScriptCompiler.defaultConfig = tsConfig; - return TypeScriptCompiler; -}()); -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 b953ea2..0000000 --- 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;AAC5B,OAAO,QAAQ,MAAM,wBAAwB,CAAA;AAa5C;IAqBG,4BACI,YAAsB;QAAtB,6BAAA,EAAA,iBAAsB;QAGtB,IAAI,CAAC,MAAM,yBACJ,kBAAkB,CAAC,aAAa,GAChC,YAAY,CAClB,CAAC;IACN,CAAC;IAED,oCAAO,GAAP,UACI,SAAmB,EACnB,MAAc;QAFlB,iBA+CC;QA1CG,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;YAG/B,IAAM,OAAO,cACT,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,EAC9B,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,EAC9B,MAAM,QAAA,IAEH,KAAI,CAAC,MAAM,CACjB,CAAC;YAGF,IAAM,IAAI,GAAG,EAAE,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;YAG5C,IAAM,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;YAG3D,IAAM,UAAU,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;YAGlC,IAAM,cAAc,GAAG,EAAE,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;YACxF,cAAc,CAAC,OAAO,CAAC,UAAA,UAAU;gBAE7B,IAAI,UAAU,CAAC,IAAI,EAAE,CAAC;oBACZ,IAAA,KAAsB,UAAU,CAAC,IAAI,CAAC,6BAA6B,CAAC,UAAU,CAAC,KAAM,CAAC,EAApF,IAAI,UAAA,EAAE,SAAS,eAAqE,CAAC;oBAC7F,IAAM,OAAO,GAAG,EAAE,CAAC,4BAA4B,CAAC,UAAU,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;oBAC9E,OAAO,CAAC,KAAK,CAAC,UAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,eAAK,IAAI,GAAG,CAAC,cAAI,SAAS,GAAG,CAAC,gBAAM,OAAO,CAAE,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,IAAM,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;IAlEe,gCAAa,GAAQ,QAAQ,CAAC;IAyHlD,yBAAC;CAAA,AArIA,IAqIA;AAOD,eAAe,kBAAkB,CAAC"} \ No newline at end of file diff --git a/script/js/class/VersionWriter.d.ts b/script/js/class/VersionWriter.d.ts deleted file mode 100644 index 669aef5..0000000 --- a/script/js/class/VersionWriter.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare class VersionWriter { - writeVersionToFile(filePath: string, version: string): Promise; -} -export default VersionWriter; diff --git a/script/js/class/VersionWriter.js b/script/js/class/VersionWriter.js deleted file mode 100644 index 62dbbd2..0000000 --- a/script/js/class/VersionWriter.js +++ /dev/null @@ -1,30 +0,0 @@ -import { __awaiter, __generator } from "tslib"; -import { promises as fs } from 'fs'; -var VersionWriter = (function () { - function VersionWriter() { - } - VersionWriter.prototype.writeVersionToFile = function (filePath, version) { - return __awaiter(this, void 0, void 0, function () { - var error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - return [4, fs.writeFile(filePath, version, 'utf8')]; - case 1: - _a.sent(); - console.log("Version ".concat(version, " written to ").concat(filePath)); - return [3, 3]; - case 2: - error_1 = _a.sent(); - console.error("Error writing version to file: ".concat(error_1)); - return [3, 3]; - case 3: return [2]; - } - }); - }); - }; - return VersionWriter; -}()); -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 8a49eec..0000000 --- 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;IAAA;IAkBD,CAAC;IAXS,0CAAkB,GAAxB,UACI,QAAgB,EAChB,OAAe;;;;;;;wBAGX,WAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAA;;wBAA7C,SAA6C,CAAC;wBAC9C,OAAO,CAAC,GAAG,CAAC,kBAAW,OAAO,yBAAe,QAAQ,CAAE,CAAC,CAAC;;;;wBAEzD,OAAO,CAAC,KAAK,CAAC,yCAAkC,OAAK,CAAE,CAAC,CAAC;;;;;;KAEhE;IACL,oBAAC;AAAD,CAAC,AAlBA,IAkBA;AAOD,eAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/script/js/config/config.d.ts b/script/js/config/config.d.ts deleted file mode 100644 index 14b2c37..0000000 --- a/script/js/config/config.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export declare const CONFIG: { - path: { - src: string; - dist: string; - json_output: string; - ts_input: string; - ts_output: string; - js_output: string; - }; -}; diff --git a/script/js/config/config.js b/script/js/config/config.js deleted file mode 100644 index 7eac528..0000000 --- a/script/js/config/config.js +++ /dev/null @@ -1,11 +0,0 @@ -export var CONFIG = { - path: { - src: './src', - dist: './dist', - json_output: './dist', - ts_input: './src/ts', - ts_output: './dist/ts', - 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 20bb397..0000000 --- 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,IAAM,MAAM,GAAG;IAClB,IAAI,EAAE;QACF,GAAG,EAAO,OAAO;QACjB,IAAI,EAAO,QAAQ;QACnB,WAAW,EAAS,QAAQ;QAC5B,QAAQ,EAAY,UAAU;QAC9B,SAAS,EAAW,WAAW;QAC/B,SAAS,EAAW,WAAW;KAElC;CAEJ,CAAC"} \ No newline at end of file diff --git a/script/js/config/fantasticon.config.d.ts b/script/js/config/fantasticon.config.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/script/js/config/fantasticon.config.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/script/js/config/fantasticon.config.js b/script/js/config/fantasticon.config.js deleted file mode 100644 index 797f36f..0000000 --- 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 d834499..0000000 --- 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.d.ts b/script/js/config/package.config.d.ts deleted file mode 100644 index 3471c17..0000000 --- a/script/js/config/package.config.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -declare const packageConfig: { - name: string; - version: string; - description: string; - keywords: string; - license: string; - homepage: string; - main: string; - types: string; - files: string[]; -}; -export default packageConfig; diff --git a/script/js/config/package.config.js b/script/js/config/package.config.js deleted file mode 100644 index 9ed18db..0000000 --- a/script/js/config/package.config.js +++ /dev/null @@ -1,22 +0,0 @@ -var packageConfig = { - name: "", - version: "", - description: "", - keywords: "", - license: "Apache-2.0", - homepage: "https://www.scape.agency", - main: "js/index", - types: "js/index", - files: [ - "svg/**/*.svg", - "js/**/*.d.ts", - "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 83b8823..0000000 --- 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":"AACA,IAAM,aAAa,GAAG;IAClB,IAAI,EAAE,EAAE;IACR,OAAO,EAAE,EAAE;IACX,WAAW,EAAE,EAAE;IACf,QAAQ,EAAE,EAAE;IACZ,OAAO,EAAE,YAAY;IACrB,QAAQ,EAAE,0BAA0B;IACpC,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,UAAU;IAIjB,KAAK,EAAE;QACH,cAAc;QACd,cAAc;QACd,kBAAkB;QAClB,YAAY;QACZ,oBAAoB;QACpB,gBAAgB;QAChB,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.d.ts b/script/js/config/postcss.config.compressed.d.ts deleted file mode 100644 index 8fb398c..0000000 --- a/script/js/config/postcss.config.compressed.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import autoprefixer from 'autoprefixer'; -declare const postcssConfigCompressed: { - plugins: (typeof autoprefixer | import("postcss/lib/processor").default)[]; -}; -export default postcssConfigCompressed; diff --git a/script/js/config/postcss.config.compressed.js b/script/js/config/postcss.config.compressed.js deleted file mode 100644 index cd8426d..0000000 --- a/script/js/config/postcss.config.compressed.js +++ /dev/null @@ -1,12 +0,0 @@ -import autoprefixer from 'autoprefixer'; -import cssnano from 'cssnano'; -var 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 c8f05c3..0000000 --- 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,IAAM,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.d.ts b/script/js/config/postcss.config.expanded.d.ts deleted file mode 100644 index 87e1a69..0000000 --- a/script/js/config/postcss.config.expanded.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import autoprefixer from 'autoprefixer'; -declare const postcssConfigExpanded: { - plugins: (typeof autoprefixer)[]; -}; -export default postcssConfigExpanded; diff --git a/script/js/config/postcss.config.expanded.js b/script/js/config/postcss.config.expanded.js deleted file mode 100644 index 0d50d10..0000000 --- a/script/js/config/postcss.config.expanded.js +++ /dev/null @@ -1,8 +0,0 @@ -import autoprefixer from 'autoprefixer'; -var 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 6ec0fe9..0000000 --- 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,IAAM,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.d.ts b/script/js/config/svgo.config.d.ts deleted file mode 100644 index 917fd95..0000000 --- a/script/js/config/svgo.config.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -/// -import path from 'node:path'; -declare const svgoConfig: { - multipass: boolean; - js2svg: { - pretty: boolean; - indent: number; - eol: string; - }; - plugins: (string | { - name: string; - params: { - overrides: { - removeUnknownsAndDefaults: { - keepDataAttrs: boolean; - keepRoleAttr: boolean; - }; - removeViewBox: boolean; - inlineStyles: { - onlyMatchedOnce: boolean; - }; - }; - attrs?: undefined; - attributes?: undefined; - }; - type?: undefined; - fn?: undefined; - } | { - name: string; - params: { - attrs: string[]; - overrides?: undefined; - attributes?: undefined; - }; - type?: undefined; - fn?: undefined; - } | { - name: string; - type: string; - params: { - attributes: { - xmlns: string; - width: string; - height: string; - fill: string; - class: string; - viewBox: string; - }; - overrides?: undefined; - attrs?: undefined; - }; - fn(_root: any, params: { - attributes: { - [s: string]: unknown; - } | ArrayLike; - }, info: { - path: string; - }): { - element: { - enter(node: { - name: string; - attributes: { - [x: string]: unknown; - }; - }, parentNode: { - type: string; - }): void; - }; - } | null; - })[]; -}; -export default svgoConfig; diff --git a/script/js/config/svgo.config.js b/script/js/config/svgo.config.js deleted file mode 100644 index e60139e..0000000 --- a/script/js/config/svgo.config.js +++ /dev/null @@ -1,72 +0,0 @@ -import path from 'node:path'; -var 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: function (_root, params, info) { - if (!params.attributes) { - return null; - } - var pathname = info.path; - var basename = path.basename(pathname, '.svg'); - return { - element: { - enter: function (node, parentNode) { - if (node.name === 'svg' && parentNode.type === 'root') { - node.attributes = {}; - for (var _i = 0, _a = Object.entries(params.attributes); _i < _a.length; _i++) { - var _b = _a[_i], key = _b[0], value = _b[1]; - node.attributes[key] = key === 'class' ? "igl igl-".concat(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 7fadadc..0000000 --- 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,IAAM,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,YAAC,KAAU,EAAE,MAAuE,EAAE,IAAuB;gBAC3G,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;oBACrB,OAAO,IAAI,CAAA;gBACf,CAAC;gBACD,IAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAA;gBAC1B,IAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;gBAEhD,OAAO;oBACH,OAAO,EAAE;wBACL,KAAK,YAAC,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,KAA2B,UAAiC,EAAjC,KAAA,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,EAAjC,cAAiC,EAAjC,IAAiC,EAAE,CAAC;oCAApD,IAAA,WAAY,EAAX,GAAG,QAAA,EAAE,KAAK,QAAA;oCAClB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,GAAG,KAAK,OAAO,CAAC,CAAC,CAAC,kBAAW,QAAQ,CAAE,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.d.ts b/script/js/config/svgsprite.config.d.ts deleted file mode 100644 index 13ea770..0000000 --- a/script/js/config/svgsprite.config.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import svgSprite from "svg-sprite"; -declare const svgspriteConfig: svgSprite.Config; -export default svgspriteConfig; diff --git a/script/js/config/svgsprite.config.js b/script/js/config/svgsprite.config.js deleted file mode 100644 index 369bc23..0000000 --- a/script/js/config/svgsprite.config.js +++ /dev/null @@ -1,44 +0,0 @@ -var 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: "unit.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 68f905f..0000000 --- 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,IAAM,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.d.ts b/script/js/config/terser.config.d.ts deleted file mode 100644 index 8daa92b..0000000 --- a/script/js/config/terser.config.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -declare const terserCofig: { - compress: { - drop_console: boolean; - drop_debugger: boolean; - pure_funcs: string[]; - }; - mangle: { - properties: boolean; - }; - format: { - comments: boolean; - beautify: boolean; - }; - keep_classnames: boolean; - keep_fnames: boolean; - toplevel: boolean; -}; -export default terserCofig; diff --git a/script/js/config/terser.config.js b/script/js/config/terser.config.js deleted file mode 100644 index d6777ca..0000000 --- a/script/js/config/terser.config.js +++ /dev/null @@ -1,19 +0,0 @@ -var 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 b036ca8..0000000 --- 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,IAAM,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.d.ts b/script/js/config/ts.config.d.ts deleted file mode 100644 index 6fe80e6..0000000 --- a/script/js/config/ts.config.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -declare const tsConfig: { - target: string; - lib: string[]; - module: string; - resolveJsonModule: boolean; - declaration: boolean; - allowSyntheticDefaultImports: boolean; - esModuleInterop: boolean; - forceConsistentCasingInFileNames: boolean; - strict: boolean; - skipLibCheck: boolean; -}; -export default tsConfig; diff --git a/script/js/config/ts.config.js b/script/js/config/ts.config.js deleted file mode 100644 index 281fc4b..0000000 --- a/script/js/config/ts.config.js +++ /dev/null @@ -1,14 +0,0 @@ -var tsConfig = { - target: "es6", - lib: ["es2015", "dom"], - module: "commonjs", - resolveJsonModule: true, - declaration: true, - allowSyntheticDefaultImports: true, - esModuleInterop: true, - forceConsistentCasingInFileNames: true, - strict: true, - skipLibCheck: true, -}; -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 f363bb8..0000000 --- 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":"AA6BA,IAAM,QAAQ,GAAG;IAqBb,MAAM,EAAE,KAAK;IAiBb,GAAG,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC;IAsBtB,MAAM,EAAE,UAAU;IAgBlB,iBAAiB,EAAE,IAAI;IAevB,WAAW,EAAE,IAAI;IAiCjB,4BAA4B,EAAE,IAAI;IAElC,eAAe,EAAE,IAAI;IAGrB,gCAAgC,EAAE,IAAI;IAMtC,MAAM,EAAE,IAAI;IA0BZ,YAAY,EAAE,IAAI;CA2GrB,CAAC;AAOF,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/script/js/function/clean_directory.d.ts b/script/js/function/clean_directory.d.ts deleted file mode 100644 index 6196caa..0000000 --- a/script/js/function/clean_directory.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function cleanDirectory(directoryPath: string): Promise; -export default cleanDirectory; diff --git a/script/js/function/clean_directory.js b/script/js/function/clean_directory.js deleted file mode 100644 index 1305e69..0000000 --- a/script/js/function/clean_directory.js +++ /dev/null @@ -1,29 +0,0 @@ -import { __awaiter, __generator } from "tslib"; -import DirectoryCleaner from '../class/DirectoryCleaner.js'; -import StylizedLogger from '../class/StylizedLogger.js'; -var directoryCleaner = new DirectoryCleaner(); -var logger = new StylizedLogger(); -function cleanDirectory(directoryPath) { - return __awaiter(this, void 0, void 0, function () { - var error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - logger.header('Clean Directories'); - return [4, directoryCleaner.cleanDirectory(directoryPath)]; - case 1: - _a.sent(); - logger.body("Directory cleaned: ".concat(directoryPath)); - return [3, 3]; - case 2: - error_1 = _a.sent(); - logger.error("Error cleaning directory: ".concat(error_1)); - throw error_1; - case 3: return [2]; - } - }); - }); -} -export default cleanDirectory; -//# sourceMappingURL=clean_directory.js.map \ No newline at end of file diff --git a/script/js/function/clean_directory.js.map b/script/js/function/clean_directory.js.map deleted file mode 100644 index 7e77d2a..0000000 --- a/script/js/function/clean_directory.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"clean_directory.js","sourceRoot":"","sources":["../../ts/function/clean_directory.ts"],"names":[],"mappings":";AAAA,OAAO,gBAAgB,MAAM,8BAA8B,CAAC;AAC5D,OAAO,cAAc,MAAM,4BAA4B,CAAC;AAGxD,IAAM,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC;AAChD,IAAM,MAAM,GAAG,IAAI,cAAc,EAAE,CAAC;AAMpC,SAAe,cAAc,CAAC,aAAqB;;;;;;;oBAE3C,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;oBACnC,WAAM,gBAAgB,CAAC,cAAc,CAAC,aAAa,CAAC,EAAA;;oBAApD,SAAoD,CAAC;oBACrD,MAAM,CAAC,IAAI,CAAC,6BAAsB,aAAa,CAAE,CAAC,CAAC;;;;oBAEnD,MAAM,CAAC,KAAK,CAAC,oCAA6B,OAAK,CAAE,CAAC,CAAC;oBACnD,MAAM,OAAK,CAAC;;;;;CAEnB;AAMD,eAAe,cAAc,CAAC"} \ No newline at end of file diff --git a/script/js/function/gl_installer.d.ts b/script/js/function/gl_installer.d.ts deleted file mode 100644 index 69b19e3..0000000 --- a/script/js/function/gl_installer.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function gl_installer(): Promise; -export default gl_installer; diff --git a/script/js/function/gl_installer.js b/script/js/function/gl_installer.js deleted file mode 100644 index ab40789..0000000 --- a/script/js/function/gl_installer.js +++ /dev/null @@ -1,52 +0,0 @@ -import { __awaiter, __generator } from "tslib"; -import NpmCommandRunner from '../class/NpmCommandRunner.js'; -import StylizedLogger from '../class/StylizedLogger.js'; -var runner = new NpmCommandRunner(); -var logger = new StylizedLogger(); -function gl_installer() { - return __awaiter(this, void 0, void 0, function () { - var packages, _i, packages_1, pkg, output, error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - packages = [ - 'pack.gl', - 'unit.gl', - 'hue.gl', - 'page.gl', - 'grid.gl', - 'block.gl', - 'deep.gl', - 'icon.gl', - 'loop.gl', - ]; - _a.label = 1; - case 1: - _a.trys.push([1, 6, , 7]); - logger.header('Install .gl libraries'); - _i = 0, packages_1 = packages; - _a.label = 2; - case 2: - if (!(_i < packages_1.length)) return [3, 5]; - pkg = packages_1[_i]; - logger.body("Running npm install for ".concat(pkg, "...")); - return [4, runner.runCommand("install ".concat(pkg, "@latest --save-dev"))]; - case 3: - output = _a.sent(); - logger.body(output); - _a.label = 4; - case 4: - _i++; - return [3, 2]; - case 5: return [3, 7]; - case 6: - error_1 = _a.sent(); - console.error('An error occurred:', error_1); - return [3, 7]; - case 7: return [2]; - } - }); - }); -} -export default gl_installer; -//# sourceMappingURL=gl_installer.js.map \ No newline at end of file diff --git a/script/js/function/gl_installer.js.map b/script/js/function/gl_installer.js.map deleted file mode 100644 index 0cb6985..0000000 --- a/script/js/function/gl_installer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gl_installer.js","sourceRoot":"","sources":["../../ts/function/gl_installer.ts"],"names":[],"mappings":";AAqBA,OAAO,gBAAgB,MAAM,8BAA8B,CAAC;AAC5D,OAAO,cAAc,MAAM,4BAA4B,CAAC;AAOxD,IAAM,MAAM,GAAG,IAAI,gBAAgB,EAAE,CAAC;AACtC,IAAM,MAAM,GAAG,IAAI,cAAc,EAAE,CAAC;AAepC,SAAe,YAAY;;;;;;oBAEjB,QAAQ,GAAG;wBACb,SAAS;wBACT,SAAS;wBACT,QAAQ;wBACR,SAAS;wBACT,SAAS;wBACT,UAAU;wBACV,SAAS;wBACT,SAAS;wBACT,SAAS;qBACZ,CAAC;;;;oBAGE,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;0BACb,EAAR,qBAAQ;;;yBAAR,CAAA,sBAAQ,CAAA;oBAAf,GAAG;oBACV,MAAM,CAAC,IAAI,CAAC,kCAA2B,GAAG,QAAK,CAAC,CAAC;oBAClC,WAAM,MAAM,CAAC,UAAU,CAClC,kBAAW,GAAG,uBAAoB,CACrC,EAAA;;oBAFK,MAAM,GAAG,SAEd;oBACD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;;;oBALN,IAAQ,CAAA;;;;;oBAQ1B,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,OAAK,CAAC,CAAC;;;;;;CAGlD;AAOD,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/script/js/function/readPackageJson.d.ts b/script/js/function/readPackageJson.d.ts deleted file mode 100644 index e418ebf..0000000 --- a/script/js/function/readPackageJson.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function readPackageJson(packageJsonPath: string): Promise; -export default readPackageJson; diff --git a/script/js/function/readPackageJson.js b/script/js/function/readPackageJson.js deleted file mode 100644 index 37166b6..0000000 --- a/script/js/function/readPackageJson.js +++ /dev/null @@ -1,20 +0,0 @@ -import { __awaiter, __generator } from "tslib"; -import fs from 'fs/promises'; -import path from 'path'; -function readPackageJson(packageJsonPath) { - return __awaiter(this, void 0, void 0, function () { - var fullPath, fileContent; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - fullPath = path.resolve(packageJsonPath); - return [4, fs.readFile(fullPath, 'utf-8')]; - case 1: - fileContent = _a.sent(); - return [2, JSON.parse(fileContent)]; - } - }); - }); -} -export default readPackageJson; -//# sourceMappingURL=readPackageJson.js.map \ No newline at end of file diff --git a/script/js/function/readPackageJson.js.map b/script/js/function/readPackageJson.js.map deleted file mode 100644 index dd85757..0000000 --- a/script/js/function/readPackageJson.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"readPackageJson.js","sourceRoot":"","sources":["../../ts/function/readPackageJson.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AAOxB,SAAe,eAAe,CAAC,eAAuB;;;;;;oBAC5C,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;oBAC3B,WAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAA;;oBAAlD,WAAW,GAAG,SAAoC;oBACxD,WAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,EAAC;;;;CAClC;AAED,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/script/js/index.js b/script/js/index.js index 2ba91f2..a126de0 100644 --- a/script/js/index.js +++ b/script/js/index.js @@ -1,13 +1,6 @@ import { __awaiter, __generator } from "tslib"; import path from 'path'; -import { DirectoryCleaner, DirectoryCopier, DirectoryCreator, VersionWriter, TypeScriptCompiler, } from 'pack.gl'; -import PackageCreator from "./class/PackageCreator.js"; -import readPackageJson from "./function/readPackageJson.js"; -var tsCompiler = new TypeScriptCompiler(); -var versionWriter = new VersionWriter(); -var directoryCopier = new DirectoryCopier(); -var directoryCleaner = new DirectoryCleaner(); -var directoryCreator = new DirectoryCreator(); +import { DirectoryCleaner, DirectoryCopier, PackageCreator, VersionWriter, TypeScriptCompiler, StylizedLogger, gl_installer, readPackageJson, } from 'pack.gl'; var CONFIG = { path: { src: './src', @@ -20,52 +13,49 @@ var CONFIG = { }; function main() { return __awaiter(this, void 0, void 0, function () { - var localPackageConfig, packageCreator, packageConfig, error_1, tsFiles, outputDir, error_2; + var logger, directoryCleaner, localPackageConfig, packageCreator, packageConfig, directoryCopier, versionWriter, tsCompiler, tsFiles, outputDir, error_1; return __generator(this, function (_a) { switch (_a.label) { case 0: - _a.trys.push([0, 7, , 8]); + _a.trys.push([0, 6, , 7]); + logger = new StylizedLogger(); + logger.header('Install .gl libraries'); + return [4, gl_installer()]; + case 1: + _a.sent(); + directoryCleaner = new DirectoryCleaner(); + logger.header('Clean Directories'); directoryCleaner.cleanDirectory(CONFIG.path.dist); - console.log("Directory cleaned: ".concat(CONFIG.path.dist)); + logger.body("Directory cleaned: ".concat(CONFIG.path.dist)); return [4, readPackageJson('./package.json')]; - case 1: + case 2: localPackageConfig = _a.sent(); packageCreator = new PackageCreator(localPackageConfig); packageConfig = packageCreator.config; packageCreator.createPackageJson(CONFIG.path.dist); - _a.label = 2; - case 2: - _a.trys.push([2, 4, , 5]); + directoryCopier = new DirectoryCopier(); return [4, directoryCopier.recursiveCopy(CONFIG.path.ts_input, CONFIG.path.ts_output)]; case 3: _a.sent(); console.log('Files copied successfully.'); - return [3, 5]; + versionWriter = new VersionWriter(); + return [4, versionWriter.writeVersionToFile('VERSION', packageConfig.version)]; case 4: - error_1 = _a.sent(); - console.error('Error while copying files:', error_1); - return [3, 5]; - case 5: return [4, versionWriter.writeVersionToFile('VERSION', packageConfig.version)]; - case 6: _a.sent(); - try { - tsFiles = [ - path.join(CONFIG.path.ts_input, 'index.ts'), - ]; - outputDir = './dist/js'; - console.log('Starting TypeScript compilation...'); - tsCompiler.compile(tsFiles, outputDir); - console.log('TypeScript compilation completed.'); - } - catch (error) { - console.error('An error occurred:', error); - } - return [3, 8]; - case 7: - error_2 = _a.sent(); - console.error('An error occurred:', error_2); - return [3, 8]; - case 8: return [2]; + tsCompiler = new TypeScriptCompiler(); + tsFiles = [ + path.join(CONFIG.path.ts_input, 'index.ts'), + ]; + outputDir = './dist/js'; + return [4, tsCompiler.compile(tsFiles, outputDir)]; + case 5: + _a.sent(); + return [3, 7]; + case 6: + error_1 = _a.sent(); + console.error('An error occurred:', error_1); + return [3, 7]; + case 7: return [2]; } }); }); diff --git a/script/js/index.js.map b/script/js/index.js.map index 7d53bc4..01c5123 100644 --- a/script/js/index.js.map +++ b/script/js/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":";AAsBA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAEhB,aAAa,EAGb,kBAAkB,GAErB,MAAM,SAAS,CAAC;AACjB,OAAO,cAAc,MAAM,2BAA2B,CAAA;AACtD,OAAO,eAAe,MAAM,+BAA+B,CAAA;AAkB3D,IAAM,UAAU,GAAG,IAAI,kBAAkB,EAAE,CAAC;AAe5C,IAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;AAC1C,IAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC;AAC9C,IAAM,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC;AAChD,IAAM,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC;AAEhD,IAAM,MAAM,GAAG;IACX,IAAI,EAAE;QACF,GAAG,EAAO,OAAO;QACjB,IAAI,EAAO,QAAQ;QACnB,WAAW,EAAS,QAAQ;QAC5B,QAAQ,EAAY,UAAU;QAC9B,SAAS,EAAW,WAAW;QAC/B,SAAS,EAAW,WAAW;KAElC;CAEJ,CAAC;AAWF,SAAe,IAAI;;;;;;;oBAMX,gBAAgB,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBAClD,OAAO,CAAC,GAAG,CAAC,6BAAsB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAE,CAAC,CAAC;oBAG3B,WAAM,eAAe,CAAC,gBAAgB,CAAC,EAAA;;oBAA5D,kBAAkB,GAAG,SAAuC;oBAC5D,cAAc,GAAG,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;oBACxD,aAAa,GAAG,cAAc,CAAC,MAAM,CAAA;oBAC3C,cAAc,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;oBAmB/C,WAAM,eAAe,CAAC,aAAa,CAC/B,MAAM,CAAC,IAAI,CAAC,QAAQ,EACpB,MAAM,CAAC,IAAI,CAAC,SAAS,CACxB,EAAA;;oBAHD,SAGC,CAAC;oBACF,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;;;;oBAE1C,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,OAAK,CAAC,CAAC;;wBAMvD,WAAM,aAAa,CAAC,kBAAkB,CAAC,SAAS,EAAE,aAAa,CAAC,OAAO,CAAC,EAAA;;oBAAxE,SAAwE,CAAC;oBAYzE,IAAI,CAAC;wBAIK,OAAO,GAAG;4BACZ,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;yBAI9C,CAAC;wBACI,SAAS,GAAG,WAAW,CAAC;wBAE9B,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;wBAClD,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;wBACvC,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;oBAGrD,CAAC;oBAAC,OAAO,KAAK,EAAE,CAAC;wBACb,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;oBAC/C,CAAC;;;;oBAID,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,OAAK,CAAC,CAAC;;;;;;CAGlD;AAQD,IAAI,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":";AAsBA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,aAAa,EACb,kBAAkB,EAElB,cAAc,EACd,YAAY,EACZ,eAAe,GAClB,MAAM,SAAS,CAAC;AAOjB,IAAM,MAAM,GAAG;IACX,IAAI,EAAE;QACF,GAAG,EAAiB,OAAO;QAC3B,IAAI,EAAgB,QAAQ;QAC5B,WAAW,EAAS,QAAQ;QAC5B,QAAQ,EAAY,UAAU;QAC9B,SAAS,EAAW,WAAW;QAC/B,SAAS,EAAW,WAAW;KAElC;CAEJ,CAAC;AAYF,SAAe,IAAI;;;;;;;oBASL,MAAM,GAAG,IAAI,cAAc,EAAE,CAAC;oBAMpC,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;oBACvC,WAAM,YAAY,EAAE,EAAA;;oBAApB,SAAoB,CAAC;oBAMf,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC;oBAChD,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;oBACnC,gBAAgB,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBAClD,MAAM,CAAC,IAAI,CAAC,6BAAsB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAE,CAAC,CAAC;oBAM3B,WAAM,eAAe,CAAC,gBAAgB,CAAC,EAAA;;oBAA5D,kBAAkB,GAAG,SAAuC;oBAC5D,cAAc,GAAG,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;oBACxD,aAAa,GAAG,cAAc,CAAC,MAAM,CAAA;oBAC3C,cAAc,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBAM7C,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC;oBAC9C,WAAM,eAAe,CAAC,aAAa,CAC/B,MAAM,CAAC,IAAI,CAAC,QAAQ,EACpB,MAAM,CAAC,IAAI,CAAC,SAAS,CACxB,EAAA;;oBAHD,SAGC,CAAC;oBACF,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;oBAMpC,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;oBAC1C,WAAM,aAAa,CAAC,kBAAkB,CAAC,SAAS,EAAE,aAAa,CAAC,OAAO,CAAC,EAAA;;oBAAxE,SAAwE,CAAC;oBAMnE,UAAU,GAAG,IAAI,kBAAkB,EAAE,CAAC;oBACtC,OAAO,GAAG;wBACZ,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;qBAC9C,CAAC;oBACI,SAAS,GAAG,WAAW,CAAC;oBAE9B,WAAM,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,EAAA;;oBAA5C,SAA4C,CAAC;;;;oBAM7C,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,OAAK,CAAC,CAAC;;;;;;CAGlD;AAQD,IAAI,EAAE,CAAC"} \ No newline at end of file diff --git a/script/js/interface/File.d.ts b/script/js/interface/File.d.ts deleted file mode 100644 index c86dd88..0000000 --- a/script/js/interface/File.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface File { - filepath: string; - source: string; -} diff --git a/script/js/interface/File.js b/script/js/interface/File.js deleted file mode 100644 index 0cfa977..0000000 --- a/script/js/interface/File.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=File.js.map \ No newline at end of file diff --git a/script/js/interface/File.js.map b/script/js/interface/File.js.map deleted file mode 100644 index 90e4a60..0000000 --- a/script/js/interface/File.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"File.js","sourceRoot":"","sources":["../../ts/interface/File.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/script/js/interface/PackageJson.d.ts b/script/js/interface/PackageJson.d.ts deleted file mode 100644 index 0942d41..0000000 --- a/script/js/interface/PackageJson.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -export 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[]; - 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/js/interface/PackageJson.js b/script/js/interface/PackageJson.js deleted file mode 100644 index c9e11e4..0000000 --- a/script/js/interface/PackageJson.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=PackageJson.js.map \ No newline at end of file diff --git a/script/js/interface/PackageJson.js.map b/script/js/interface/PackageJson.js.map deleted file mode 100644 index 9dbc63a..0000000 --- a/script/js/interface/PackageJson.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PackageJson.js","sourceRoot":"","sources":["../../ts/interface/PackageJson.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/script/js/interface/SVG.d.ts b/script/js/interface/SVG.d.ts deleted file mode 100644 index b678155..0000000 --- a/script/js/interface/SVG.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface Svg { - metadata: { - name: string; - }; - source: string; -} diff --git a/script/js/interface/SVG.js b/script/js/interface/SVG.js deleted file mode 100644 index e065e1e..0000000 --- a/script/js/interface/SVG.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=SVG.js.map \ No newline at end of file diff --git a/script/js/interface/SVG.js.map b/script/js/interface/SVG.js.map deleted file mode 100644 index 1b17059..0000000 --- a/script/js/interface/SVG.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SVG.js","sourceRoot":"","sources":["../../ts/interface/SVG.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/script/js/interfaces/File.d.ts b/script/js/interfaces/File.d.ts deleted file mode 100644 index 5bb0d02..0000000 --- a/script/js/interfaces/File.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -interface File { - filepath: string; - source: string; -} diff --git a/script/js/interfaces/File.js b/script/js/interfaces/File.js deleted file mode 100644 index 7da5bc0..0000000 --- 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 861a8ab..0000000 --- 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.d.ts b/script/js/interfaces/PackageJson.d.ts deleted file mode 100644 index ef77e91..0000000 --- a/script/js/interfaces/PackageJson.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -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[]; - 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/js/interfaces/PackageJson.js b/script/js/interfaces/PackageJson.js deleted file mode 100644 index 4f3242c..0000000 --- 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 8ba9bed..0000000 --- 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.d.ts b/script/js/interfaces/SVG.d.ts deleted file mode 100644 index 394d3c1..0000000 --- a/script/js/interfaces/SVG.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -interface Svg { - metadata: { - name: string; - }; - source: string; -} diff --git a/script/js/interfaces/SVG.js b/script/js/interfaces/SVG.js deleted file mode 100644 index e8b1633..0000000 --- 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 2bb813f..0000000 --- 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/PackageCreator.ts b/script/ts/class/PackageCreator.ts deleted file mode 100644 index f076ee8..0000000 --- a/script/ts/class/PackageCreator.ts +++ /dev/null @@ -1,167 +0,0 @@ -// 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/promises'; -import path from 'path'; -import { PackageJson } from '../interface/PackageJson.js'; -import packageConfig from "../config/package.config.js" - -// ============================================================================ -// Classes -// ============================================================================ - -/** - * A class for creating a package.json file for a project. - */ - class PackageCreator { - - - - /** - * Configuration for the TypeScript compiler. - */ - public config: any; - // private config: ts.CompilerOptions; - // private config: { [key: symbol]: any}; - - /** - * Default configuration for the packageConfig compiler. - */ - private static defaultConfig: any = packageConfig; - // private static defaultConfig: ts.CompilerOptions = tsConfig; - - /** - * Initializes a new instance of the PackageCreator class. - * @param {PackageJson} packageJson - The content to be written into package.json. - */ - constructor( - customConfig: any = {}, - // customConfig: any = {}, - // customConfig: ts.CompilerOptions = {}, - ) { - let newConfig = { - // Populate with necessary fields from packageData - name: customConfig.name, - version: customConfig.version, - description: customConfig.description, - keywords: customConfig.keywords, - license: customConfig.license, - homepage: customConfig.homepage, - // main: 'index.js', - dependencies: customConfig.dependencies, - // files: [ - // "svg/**/*.{svg}", - // "js/**/*.{js,map}", - // "ts/**/*.ts", - // "css/**/*.{css,map}", - // "scss/**/*.{scss}", - // "font/**/*.{eot,otf,ttf,woff,woff2}", - // "!.DS_Store" - // ], - } - - this.config = { - ...PackageCreator.defaultConfig, - ...newConfig - }; - } - - - - - - // 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 = { - // // Populate with necessary fields from packageData - // name: packageJson.name, - // version: packageJson.version, - // description: packageJson.description, - // keywords: packageJson.keywords, - // license: packageJson.license, - // homepage: packageJson.homepage, - // main: 'index.js', - // dependencies: packageJson.dependencies, - // files: [ - // "svg/**/*.{svg}", - // "js/**/*.{js,map}", - // "ts/**/*.ts", - // "css/**/*.{css,map}", - // "scss/**/*.{scss}", - // "font/**/*.{eot,otf,ttf,woff,woff2}", - // "!.DS_Store" - // ], - // } - // } - - - - - /** - * Creates a package.json file in the specified directory. - * Creates the directory if it does not exist. - * @param 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.config, null, 2); - - try { - // Ensure the output directory exists - await this.ensureDirectoryExists(outputDir); - - // Write the package.json file - await fs.writeFile(filePath, data, 'utf-8'); - console.log(`package.json created at ${filePath}`); - } catch (error) { - console.error(`Error creating package.json: ${error}`); - throw error; - } - } - - /** - * Ensures that the given directory exists. Creates it if it does not exist. - * @param dirPath - The path of the directory to check and create. - */ - private async ensureDirectoryExists(dirPath: string): Promise { - try { - await fs.mkdir(dirPath, { recursive: true }); - } catch (error) { - // Check if error is an instance of NodeJS.ErrnoException - if (error instanceof Error && (error as NodeJS.ErrnoException).code !== 'EEXIST') { - throw error; // Rethrow if it's not a 'directory exists' error - } - } - } - -} - - -// ============================================================================ -// Export -// ============================================================================ - -export default PackageCreator; diff --git a/script/ts/class/TypeScriptCompiler.ts b/script/ts/class/TypeScriptCompiler.ts deleted file mode 100644 index 1cae502..0000000 --- a/script/ts/class/TypeScriptCompiler.ts +++ /dev/null @@ -1,242 +0,0 @@ -// 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'; -import tsConfig from "../config/ts.config.js" - - -// ============================================================================ -// Classes -// ============================================================================ - -// type CompilerOptions = ts.CompilerOptions | Record; - - -/** - * TypeScriptCompiler class for compiling TypeScript files to JavaScript. - */ - class TypeScriptCompiler { - - /** - * Configuration for the TypeScript compiler. - */ - // private config: ts.CompilerOptions; - private config: any; - // private config: { [key: symbol]: any}; - - /** - * Default configuration for the TypeScript compiler. - */ - private static defaultConfig: any = tsConfig; - // private static defaultConfig: ts.CompilerOptions = tsConfig; - // private static defaultConfig: CompilerOptions = tsConfig; - - /** - * Constructs an instance with merged configuration of default and custom options. - * @param {any} customConfig - Optional custom configuration object for TypeScript compiler - // * @param {ts.CompilerOptions} customConfig - Optional custom configuration object for TypeScript compiler - */ - constructor( - customConfig: any = {}, - // customConfig: ts.CompilerOptions = {}, - ) { - this.config = { - ...TypeScriptCompiler.defaultConfig, - ...customConfig - }; - } - - 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')); - } - }); - } - - - // /** - // * Compiles TypeScript files to JavaScript. - // * @param filePaths - The paths of TypeScript files to be compiled. - // * @param outDir - Optional. The directory where the compiled JavaScript files will be saved. - // * 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 - // ): Promise { - // return new Promise((resolve, reject) => { - // // Use outDir if provided, else fall back to this.config.outDir or a default - // const options = { ...this.config, outDir: outDir || this.config.outDir || 'dist' }; - // // 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 diagnostics = ts.getPreEmitDiagnostics(program).concat(emitResult.diagnostics); - // if (diagnostics.length > 0) { - // const diagnosticMessage = this.formatDiagnostics(diagnostics); - // console.error(diagnosticMessage); - // reject(new Error('TypeScript compilation failed')); - // return; - // } - - // console.log('Compilation completed successfully.'); - // resolve(); - // }); - // } - - // /** - // * Formats TypeScript compiler diagnostics for readable output. - // * @param diagnostics - Array of TypeScript diagnostics - // */ - // private formatDiagnostics(diagnostics: readonly ts.Diagnostic[]): string { - // return diagnostics.map(diagnostic => { - // if (diagnostic.file) { - // const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start!); - // const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); - // return `${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`; - // } - // return ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); - // }).join('\n'); - // } - -} - - -// ============================================================================ -// Export -// ============================================================================ - -export default TypeScriptCompiler; - - - - - - // /** - // * 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')); - // } - // }); - // } \ No newline at end of file diff --git a/script/ts/config/config.ts b/script/ts/config/config.ts deleted file mode 100644 index a502c53..0000000 --- a/script/ts/config/config.ts +++ /dev/null @@ -1,13 +0,0 @@ - -export const CONFIG = { - path: { - src: './src', - dist: './dist', - json_output: './dist', - ts_input: './src/ts', - ts_output: './dist/ts', - 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 27c9f9c..0000000 --- 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: 'unit.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/unit.gl.json', -// css: './dist/font/unit.gl.css', -// scss: './dist/font/unit.gl.scss', -// woff: './dist/font/unit.gl.woff', -// woff2: './dist/font/unit.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/unit.gl.css.hbs', -// // scss: './build/font/unit.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 29ccf2f..0000000 --- a/script/ts/config/package.config.ts +++ /dev/null @@ -1,56 +0,0 @@ - -const packageConfig = { - name: "", - version: "", - description: "", - keywords: "", - license: "Apache-2.0", - homepage: "https://www.scape.agency", - main: "js/index", - types: "js/index", - // main: "js/index.js", - // types: "js/index.d.ts", - // main: 'index.js', - files: [ - "svg/**/*.svg", - "js/**/*.d.ts", - "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 b151bc6..0000000 --- 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 ff82010..0000000 --- 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 eb14ed5..0000000 --- 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 879593d..0000000 --- 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: "unit.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 87268eb..0000000 --- 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 e7ffba3..0000000 --- a/script/ts/config/ts.config.ts +++ /dev/null @@ -1,305 +0,0 @@ -// config/ts.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 ts from 'typescript'; - - -// ============================================================================ -// Constants -// ============================================================================ - -// const tsConfig: ts.CompilerOptions = { -const tsConfig = { - - - // Visit https://aka.ms/tsconfig.json to read more about this file - - - // Projects - // ======================================================================== - - // incremental: true, // boolean // Enable incremental compilation - // composite: true, // boolean // Enable constraints that allow a TypeScript project to be used with project references. - // tsBuildInfoFile: "./", // Specify the folder for .tsbuildinfo incremental compilation files. - // disableSourceOfProjectReferenceRedirect: true, // boolean // Disable preferring source files instead of declaration files when referencing composite projects - // disableSolutionSearching: true, // boolean // Opt a project out of multi-project reference checking when editing. - // disableReferencedProjectLoad: true, // boolean // Reduce the number of projects loaded automatically by TypeScript. - - - // Language and Environment - // ======================================================================== - - // target: ts.ScriptTarget.ES2015, - target: "es6", // Specify ECMAScript target version - // ES3 = 0, - // ES5 = 1, - // ES2015 = 2, - // ES2016 = 3, - // ES2017 = 4, - // ES2018 = 5, - // ES2019 = 6, - // ES2020 = 7, - // ES2021 = 8, - // ES2022 = 9, - // ESNext = 99, - // JSON = 100, - // Latest = 99, - - // target: "es2015", // Set the JavaScript language version for emitted JavaScript and include compatible library declarations. - // lib: ["esnext", "es2017", "ES2015", "dom"], // Specify a set of bundled library declaration files that describe the target runtime environment. - lib: ["es2015", "dom"], // Specify library files to be included in the compilation - // lib: ["es2015"] // Specify library files to be included in the compilation - // jsx: "preserve", // Specify what JSX code is generated. - // experimentalDecorators: true, // Enable experimental support for TC39 stage 2 draft decorators. - // emitDecoratorMetadata: true, // Emit design-type metadata for decorated declarations in source files. - // jsxFactory: "", // Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' - // jsxFragmentFactory: "", // Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. - // jsxImportSource: "", // Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` - // reactNamespace: "", // Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. - // noLib: true, // Disable including any library files, including the default lib.d.ts. - // useDefineForClassFields: true, // Emit ECMAScript-standard-compliant class fields. - - - // Modules - // ======================================================================== - - // module?: ModuleKind; - // moduleResolution?: ModuleResolutionKind; - // moduleSuffixes?: string[]; - // moduleDetection?: ModuleDetectionKind; - - // module: ts.ModuleKind.CommonJS, - module: "commonjs", // Specify module code generation - // module: "CommonJS", - // module: "esnext", // Specify what module code is generated. - // rootDir: ".", // Specify the root folder within your source files. - // moduleResolution: "node", // Specify how TypeScript looks up a file from a given module specifier. - // baseUrl: "src" // Specify the base directory to resolve non-relative module names., - // paths: { - // "@/*: ["./*"], - // "#/*: ["./*"] - // }, - // rootDirs: [], // Allow multiple folders to be treated as one when resolving modules. - // typeRoots: [ // Specify multiple folders that act like `./node_modules/@types`. - // "node_modules/@types" - // ], - // types: [], // Specify type package names to be included without being referenced in a source file. - // allowUmdGlobalAccess: true, // Allow accessing UMD globals from modules. - resolveJsonModule: true, // Enable importing .json files - // noResolve: true, // Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project. - - - // JavaScript Support - // ======================================================================== - - // allowJs: true boolean // Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files., - // checkJs: false // Enable error reporting in type-checked JavaScript files., - // maxNodeModuleJsDepth: 1, // Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. - - - // Emit - // ======================================================================== - - declaration: true, // Enables generation of .d.ts files - - // "declaration: true, // Generate .d.ts files from TypeScript and JavaScript files in your project. -// "declarationMap: true, // Create sourcemaps for d.ts files. - // emitDeclarationOnly: true, // Only output d.ts files and not JavaScript files. - // sourceMap: true, // Create source map files for emitted JavaScript files. - // outFile: "./", // Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. - // outDir: "./dist", // Specify an output folder for all emitted files. - // removeComments: true, // Disable emitting comments. - // noEmit: true, // Disable emitting files from a compilation. - // noImplicitReturns: true, - // was true, maar es5/6 trekt dat niet - // importHelpers: true, // Allow importing helper functions from tslib once per project, instead of including them per-file. - // importsNotUsedAsValues: "remove", // Specify emit/checking behavior for imports that are only used for types - // downlevelIteration: false, // Emit more compliant, but verbose and less performant JavaScript for iteration. - // sourceRoot: "", // Specify the root path for debuggers to find the reference source code. - // mapRoot: "", // Specify the location where debugger should locate map files instead of generated locations. - // inlineSourceMap: true, // Include sourcemap files inside the emitted JavaScript. - // inlineSources: true, // Include source code in the sourcemaps inside the emitted JavaScript. - // emitBOM: true, // Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. - // newLine: "crlf", // Set the newline character for emitting files. - // stripInternal: true, // Disable emitting declarations that have `@internal` in their JSDoc comments. - // noEmitHelpers: true, // Disable generating custom helper functions like `__extends` in compiled output. - // noEmitOnError: false, // Disable emitting files if any type checking errors are reported. - // preserveConstEnums: true, // Disable erasing `const enum` declarations in generated code. - // declarationDir: "./", // Specify the output directory for generated declaration files. - // preserveValueImports: true, // Preserve unused imported values in the JavaScript output that would otherwise be removed. - - - // Interop Constraints - // ======================================================================== - - // isolatedModules: true, // Ensure that each file can be safely transpiled without relying on other imports. - allowSyntheticDefaultImports: true, // Allow 'import x from y' when a module doesn't have a default export. - // Enables compatibility with Babel imports - esModuleInterop: true, // Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. - // preserveSymlinks: true, // Disable resolving symlinks to their realpath. This correlates to the same flag in node. - // forceConsistentCasingInFileNames: true, // Ensure that casing is correct in imports. - forceConsistentCasingInFileNames: true, // Disallow inconsistently-cased references - - - // Type Checking - // ======================================================================== - - strict: true, // Enable all strict type-checking options., - // noImplicitAny: true, // Enable error reporting for expressions and declarations with an implied `any` type.. - // strictNullChecks: true, // When type checking, take into account `null` and `undefined`. - // strictFunctionTypes: true, // When assigning functions, check to ensure parameters and the return values are subtype-compatible. - // strictBindCallApply: true, // Check that the arguments for `bind`, `call`, and `apply` methods match the original function. - // strictPropertyInitialization: true, // Check for class properties that are declared but not set in the constructor. - // noImplicitThis: true, // Enable error reporting when `this` is given the type `any`. - // useUnknownInCatchVariables: true, // Type catch clause variables as 'unknown' instead of 'any'. - // alwaysStrict: true, // Ensure 'use strict' is always emitted. - // noUnusedLocals: true, // Enable error reporting when a local variables aren't read. - // noUnusedParameters: true, // Raise an error when a function parameter isn't read - // exactOptionalPropertyTypes: true, // Interpret optional property types as written, rather than adding 'undefined'. - // noImplicitReturns: true, // Enable error reporting for codepaths that do not explicitly return in a function. - // noFallthroughCasesInSwitch: true, // Enable error reporting for fallthrough cases in switch statements. - // noUncheckedIndexedAccess: true, // Include 'undefined' in index signature results - // noImplicitOverride: true, // Ensure overriding members in derived classes are marked with an override modifier. - // noPropertyAccessFromIndexSignature: true, // Enforces using indexed accessors for keys declared using an indexed type - // allowUnusedLabels: true, // Disable error reporting for unused labels. - // allowUnreachableCode: true, // Disable error reporting for unreachable code. - - - // Completeness - // ======================================================================== - - // skipDefaultLibCheck: true, // Skip type checking .d.ts files that are included with TypeScript. - // Skip type checking of declaration files - skipLibCheck: true, // Skip type checking all .d.ts files. - - - // Other - // ======================================================================== - // 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; - - // 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/function/readPackageJson.ts b/script/ts/function/readPackageJson.ts deleted file mode 100644 index ccfa0bd..0000000 --- a/script/ts/function/readPackageJson.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Assuming you're using ES6 module syntax -import fs from 'fs/promises'; -import path from 'path'; - -/** - * Reads and parses the package.json file. - * @param packageJsonPath - The path to the package.json file. - * @returns The parsed package.json object. - */ -async function readPackageJson(packageJsonPath: string) { - const fullPath = path.resolve(packageJsonPath); - const fileContent = await fs.readFile(fullPath, 'utf-8'); - return JSON.parse(fileContent); -} - -export default readPackageJson; diff --git a/script/ts/index.ts b/script/ts/index.ts index eb7685d..bbe6ff8 100644 --- a/script/ts/index.ts +++ b/script/ts/index.ts @@ -24,57 +24,24 @@ import path from 'path'; import { DirectoryCleaner, DirectoryCopier, - DirectoryCreator, - // PackageCreator, + PackageCreator, VersionWriter, - // TypeScriptCompiler, - // JavaScriptMinifier, TypeScriptCompiler, + // JavaScriptMinifier, + StylizedLogger, gl_installer, + readPackageJson, } from 'pack.gl'; -import PackageCreator from "./class/PackageCreator.js" -import readPackageJson from "./function/readPackageJson.js" - - - -// import TypeScriptCompiler from "./class/TypeScriptCompiler.js" - -// Import necessary configurations -// import { CONFIG } from './config/config.js'; -// import packageConfig from "./config/package.config.js" -// import tsConfig from "./config/ts.config.js" // ============================================================================ // Constants // ============================================================================ -// Initialize instances of necessary classes -// const directories = Object.values(CONFIG.path); -const tsCompiler = new TypeScriptCompiler(); - - - - - -// const packageCreator = PackageCreator.init('../../package.json') - -// .then(packageCreator => packageCreator.createPackageJson(CONFIG.path.dist)) -// .catch(error => console.error('Error:', error)); - -// const packageConfig = packageCreator.packageConfig - // await packageCreator.createPackageJson(CONFIG.path.dist); - - -const versionWriter = new VersionWriter(); -const directoryCopier = new DirectoryCopier(); -const directoryCleaner = new DirectoryCleaner(); -const directoryCreator = new DirectoryCreator(); - const CONFIG = { path: { - src: './src', - dist: './dist', + src: './src', + dist: './dist', json_output: './dist', ts_input: './src/ts', ts_output: './dist/ts', @@ -84,6 +51,7 @@ const CONFIG = { }; + // ============================================================================ // Functions // ============================================================================ @@ -97,78 +65,69 @@ async function main() { try { - // Dirs Clean - // -------------------------------------------------------------------- - directoryCleaner.cleanDirectory(CONFIG.path.dist); - console.log(`Directory cleaned: ${CONFIG.path.dist}`); - const localPackageConfig = await readPackageJson('./package.json'); - const packageCreator = new PackageCreator(localPackageConfig); - const packageConfig = packageCreator.config - packageCreator.createPackageJson(CONFIG.path.dist); + // Init Logger + // -------------------------------------------------------------------- - // await gl_installer(); + const logger = new StylizedLogger(); + // Install .gl libraries + // -------------------------------------------------------------------- + logger.header('Install .gl libraries'); + await gl_installer(); - // Dirs Create + // Dirs Clean // -------------------------------------------------------------------- - // console.log('Starting Directory creation...'); - // // Assuming the base path is the current directory - // await directoryCreator.createDirectories('.', directories); + const directoryCleaner = new DirectoryCleaner(); + logger.header('Clean Directories'); + directoryCleaner.cleanDirectory(CONFIG.path.dist); + logger.body(`Directory cleaned: ${CONFIG.path.dist}`); - // Copy Dirs + // Package JSON // -------------------------------------------------------------------- - try { - await directoryCopier.recursiveCopy( - CONFIG.path.ts_input, - CONFIG.path.ts_output, - ); - console.log('Files copied successfully.'); - } catch (error) { - console.error('Error while copying files:', error); - } + + const localPackageConfig = await readPackageJson('./package.json'); + const packageCreator = new PackageCreator(localPackageConfig); + const packageConfig = packageCreator.config + packageCreator.createPackageJson(CONFIG.path.dist); - // Version + // Copy Dirs // -------------------------------------------------------------------- - await versionWriter.writeVersionToFile('VERSION', packageConfig.version); + + const directoryCopier = new DirectoryCopier(); + await directoryCopier.recursiveCopy( + CONFIG.path.ts_input, + CONFIG.path.ts_output, + ); + console.log('Files copied successfully.'); - // Package JSON + // Version // -------------------------------------------------------------------- + const versionWriter = new VersionWriter(); + await versionWriter.writeVersionToFile('VERSION', packageConfig.version); // Compile TypeScript to JavaScript // -------------------------------------------------------------------- + const tsCompiler = new TypeScriptCompiler(); + const tsFiles = [ + path.join(CONFIG.path.ts_input, 'index.ts'), + ]; + const outputDir = './dist/js'; + // console.log('Starting TypeScript compilation...'); + await tsCompiler.compile(tsFiles, outputDir); + // console.log('TypeScript compilation completed.'); - try { - // Other code... - - // TypeScript compilation - const tsFiles = [ - path.join(CONFIG.path.ts_input, 'index.ts'), - // './src/ts/index.ts', - // './src/ts/file1.ts', - // './src/ts/file2.ts' - ]; // Replace with actual file paths - const outputDir = './dist/js'; - - console.log('Starting TypeScript compilation...'); - tsCompiler.compile(tsFiles, outputDir); - console.log('TypeScript compilation completed.'); - - // Other code... - } catch (error) { - console.error('An error occurred:', error); - } } catch (error) { diff --git a/script/ts/interface/File.ts b/script/ts/interface/File.ts deleted file mode 100644 index 14e2f7d..0000000 --- a/script/ts/interface/File.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface File { - filepath: string; - source: string; -} \ No newline at end of file diff --git a/script/ts/interface/PackageJson.ts b/script/ts/interface/PackageJson.ts deleted file mode 100644 index 6e56cb2..0000000 --- a/script/ts/interface/PackageJson.ts +++ /dev/null @@ -1,70 +0,0 @@ -// ============================================================================ -// Interfaces -// ============================================================================ - -export 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/interface/SVG.ts b/script/ts/interface/SVG.ts deleted file mode 100644 index f9a25fc..0000000 --- a/script/ts/interface/SVG.ts +++ /dev/null @@ -1,12 +0,0 @@ - - - -// Assuming the structure of your SVG object, you might need to adjust these types -export interface Svg { - metadata: { - name: string; - // ... other metadata properties - }; - source: string; - // ... other Svg properties -} \ No newline at end of file