ui: add packtracker

This commit is contained in:
undefined committed 2022-07-01 13:56:47 +08:00
1 parent f83af97ac0
commit d8319cb9b0
4 files changed
+9 -1

No files matched your search

@@ -11,6 +11,7 @@ import CopyWebpackPlugin from 'copy-webpack-plugin';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import SpeedMeasurePlugin from 'speed-measure-webpack-plugin'; import SpeedMeasurePlugin from 'speed-measure-webpack-plugin';
import WebpackBar from 'webpackbar'; import WebpackBar from 'webpackbar';
import PacktrackerPlugin from '@packtracker/webpack-plugin';
import mapWebpackUrlPrefix from '../utils/mapWebpackUrlPrefix'; import mapWebpackUrlPrefix from '../utils/mapWebpackUrlPrefix';
import root from '../utils/root'; import root from '../utils/root';
@@ -232,6 +233,11 @@ export default function (env = {}) {
}], }],
}), }),
...env.measure ? [new BundleAnalyzerPlugin({ analyzerPort: 'auto' })] : [], ...env.measure ? [new BundleAnalyzerPlugin({ analyzerPort: 'auto' })] : [],
...process.env.PT_PROJECT_TOKEN ? [new PacktrackerPlugin({
project_token: process.env.PT_PROJECT_TOKEN,
upload: true,
fail_build: false,
})] : [],
], ],
}; };
+1
View File
@@ -20,6 +20,7 @@
"@fontsource/source-code-pro": "^4.5.10", "@fontsource/source-code-pro": "^4.5.10",
"@fontsource/ubuntu-mono": "^4.5.10", "@fontsource/ubuntu-mono": "^4.5.10",
"@hydrooj/utils": "workspace:*", "@hydrooj/utils": "workspace:*",
"@packtracker/webpack-plugin": "^2.3.0",
"@types/gulp-if": "^0.0.34", "@types/gulp-if": "^0.0.34",
"@types/jquery": "^3.5.14", "@types/jquery": "^3.5.14",
"@types/json-schema": "^7.0.11", "@types/json-schema": "^7.0.11",
@@ -79,5 +79,6 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endif %} {% endif %}
{% block script %}{% endblock %}
</body> </body>
</html> </html>
+1 -1
View File
@@ -2,7 +2,7 @@ import { inspect } from 'util';
declare global { declare global {
interface StringConstructor { interface StringConstructor {
random: (digit?: number) => string; random: (digit?: number, dict?: string) => string;
} }
interface String { interface String {
format: (...args: Array<any>) => string; format: (...args: Array<any>) => string;