diff --git a/package-lock.json b/package-lock.json index 7fd7471..83cb54d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2998,15 +2998,6 @@ "fill-range": "^7.0.1" } }, - "brotli": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/brotli/-/brotli-1.3.2.tgz", - "integrity": "sha1-UlqcrU/LqWR119OI9q7LE+7VL0Y=", - "dev": true, - "requires": { - "base64-js": "^1.1.2" - } - }, "browserslist": { "version": "4.17.3", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.3.tgz", diff --git a/package.json b/package.json index f8bab61..0a90d7c 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,7 @@ "build-prod": "ng build --configuration=production", "test": "ng test", "lint": "ng lint", - "e2e": "ng e2e", - "compress": "node scripts/brotli-compress.js", - "build-prod-and-compress": "npm run build-prod && npm run compress" + "e2e": "ng e2e" }, "repository": { "type": "git", @@ -52,7 +50,6 @@ "@types/leaflet": "^1.7.5", "@types/node": "^12.20.29", "@types/papaparse": "^5.2.6", - "brotli": "^1.3.2", "codelyzer": "^6.0.0", "jasmine-core": "~3.9.0", "jasmine-spec-reporter": "~7.0.0", diff --git a/scripts/brotli-compress.js b/scripts/brotli-compress.js deleted file mode 100644 index fd15cf3..0000000 --- a/scripts/brotli-compress.js +++ /dev/null @@ -1,24 +0,0 @@ -const fs = require('fs'); -const brotli = require('brotli'); - - -const brotliSettings = { - extension: 'br', - skipLarger: true, - mode: 1, - quality: 10, - lgwin: 12, - threshold: 10240 -}; - -const DATA_PATH = './dist/baumfreunde-md-web/assets/data/'; - - -fs.readdirSync(DATA_PATH).forEach(file => { - - if (file.endsWith('.csv') || file.endsWith('.txt')) { - const result = brotli.compress(fs.readFileSync(DATA_PATH + file), brotliSettings); - fs.writeFileSync(`${DATA_PATH}${file}.br`, result); - } - -});