Revert "openvidu-components: Reduced bundle size compressing code"

This reverts commit 0cab779c8e.
pull/780/head
Carlos Santos 2023-02-24 12:08:54 +01:00
parent d99fb47161
commit 64d3c09bd4
3 changed files with 12630 additions and 662 deletions

View File

@ -1,20 +0,0 @@
const glob = require('glob');
const { readFileSync, writeFileSync } = require('fs');
const { minify } = require('uglify-js');
const options = {
mangle: true,
compress: true,
toplevel: false,
output: {
comments: false
}
};
glob('dist/openvidu-angular/**/*.mjs', {}, function (er, files) {
files.forEach(function (file) {
const code = readFileSync(file, 'utf8');
const result = minify(code, options);
writeFileSync(file, result.code, 'utf8');
});
});

File diff suppressed because it is too large Load Diff

View File

@ -32,7 +32,6 @@
"codelyzer": "6.0.2", "codelyzer": "6.0.2",
"concat": "^1.0.3", "concat": "^1.0.3",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"glob": "^8.1.0",
"http-server": "14.1.1", "http-server": "14.1.1",
"jasmine-core": "3.10.1", "jasmine-core": "3.10.1",
"jasmine-spec-reporter": "7.0.0", "jasmine-spec-reporter": "7.0.0",
@ -51,7 +50,6 @@
"ts-node": "10.4.0", "ts-node": "10.4.0",
"tslint": "6.1.3", "tslint": "6.1.3",
"typescript": "4.8.4", "typescript": "4.8.4",
"uglify-js": "^3.17.4",
"webpack-bundle-analyzer": "^4.5.0" "webpack-bundle-analyzer": "^4.5.0"
}, },
"name": "openvidu-components-testapp", "name": "openvidu-components-testapp",
@ -62,8 +60,7 @@
"doc:build": "npx compodoc -c ./projects/openvidu-angular/doc/.compodocrc.json", "doc:build": "npx compodoc -c ./projects/openvidu-angular/doc/.compodocrc.json",
"doc:clean-copy": "rm -rf ../../openvidu.io-docs/docs/api/openvidu-angular && cp -r ./docs/openvidu-angular/ ../../openvidu.io-docs/docs/api/openvidu-angular", "doc:clean-copy": "rm -rf ../../openvidu.io-docs/docs/api/openvidu-angular && cp -r ./docs/openvidu-angular/ ../../openvidu.io-docs/docs/api/openvidu-angular",
"doc:serve": "npx compodoc --watch --serve -c ./projects/openvidu-angular/doc/.compodocrc.json", "doc:serve": "npx compodoc --watch --serve -c ./projects/openvidu-angular/doc/.compodocrc.json",
"lib:build": "ng build openvidu-angular --configuration production && npm run lib:compress && cd ./dist/openvidu-angular && npm pack", "lib:build": "ng build openvidu-angular --configuration production && cd ./dist/openvidu-angular && npm pack",
"lib:compress": "node ./openvidu-angular-compress.js",
"lib:copy": "cp dist/openvidu-angular/openvidu-angular-*.tgz ../../openvidu-tutorials/openvidu-call/openvidu-call-front", "lib:copy": "cp dist/openvidu-angular/openvidu-angular-*.tgz ../../openvidu-tutorials/openvidu-call/openvidu-call-front",
"lib:e2e": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/angular.test.js", "lib:e2e": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/angular.test.js",
"lib:e2e-ci": "cross-env LAUNCH_MODE=CI npm run lib:e2e", "lib:e2e-ci": "cross-env LAUNCH_MODE=CI npm run lib:e2e",