feat(dev-infra): exposed new rule 'component_benchmark' via dev_infra (#36434)
* Move tools/brotli-cli, tools/browsers, tools/components, tools/ng_rollup_bundle, and modules/e2e_util to dev-infra/benchmarking * Fix imports and references to moved folders and files * Set up BUILD.bazel files for moved folders so they can be packaged with dev-infra's :npm_package PR Close #36434
This commit is contained in:

committed by
Andrew Kushnir

parent
e37f2663c2
commit
b7f2a033df
@ -1,11 +0,0 @@
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary")
|
||||
|
||||
nodejs_binary(
|
||||
name = "brotli-cli",
|
||||
data = [
|
||||
"cli.js",
|
||||
"@npm//brotli",
|
||||
],
|
||||
entry_point = ":cli.js",
|
||||
visibility = ["//:__subpackages__"],
|
||||
)
|
@ -1,21 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
const compress = require('brotli/compress');
|
||||
|
||||
function main(args) {
|
||||
const output = args[0].substring('--output='.length);
|
||||
const input = args[1];
|
||||
const buffer = fs.readFileSync(input);
|
||||
fs.writeFileSync(output, compress(buffer, {mode: 0, quality: 11}));
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
main(process.argv.slice(2));
|
||||
}
|
Reference in New Issue
Block a user