Revert "build: Bazel builds ngfactories for packages/core (#18289)"
This reverts commit bcea196530
.
This commit is contained in:
@ -1,19 +0,0 @@
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "nodejs_binary")
|
||||
|
||||
licenses(["notice"]) # Apache 2.0
|
||||
|
||||
ts_library(
|
||||
name = "ngc_lib",
|
||||
srcs = ["index.ts"],
|
||||
deps = [
|
||||
"//packages/compiler-cli",
|
||||
"@build_bazel_rules_typescript//internal/tsc_wrapped"
|
||||
],
|
||||
)
|
||||
|
||||
nodejs_binary(
|
||||
name = "ngc-wrapped",
|
||||
entry_point = "__main__/tools/ngc-wrapped/index.js",
|
||||
data = [":ngc_lib"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
@ -1,6 +0,0 @@
|
||||
# ngc-wrapped
|
||||
|
||||
This is a wrapper around @angular/compiler-cli that makes ngc run under Bazel.
|
||||
It should be identical to https://github.com/bazelbuild/rules_angular/tree/master/internal/ngc
|
||||
however that is built against Angular packages from npm, while ngc-wrapped is
|
||||
built using Bazel against Angular at HEAD.
|
@ -1,37 +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
|
||||
*/
|
||||
|
||||
// TODO(chuckj): Remove the requirment for a fake 'reflect` implementation from
|
||||
// the compiler
|
||||
import 'reflect-metadata';
|
||||
import {ngc} from '@angular/compiler-cli';
|
||||
import * as fs from 'fs';
|
||||
// Note, the tsc_wrapped module comes from rules_typescript, not from @angular/tsc-wrapped
|
||||
import {parseTsconfig} from 'tsc_wrapped';
|
||||
|
||||
function main(args: string[]) {
|
||||
const [{options, bazelOpts, files, config}] = parseTsconfig(args[1]);
|
||||
const ngOptions: {expectedOut: string[]} = (config as any).angularCompilerOptions;
|
||||
|
||||
const result = ngc(args, undefined, files, options, ngOptions);
|
||||
|
||||
if (result === 0) {
|
||||
// Ensure that expected output files exist.
|
||||
if (ngOptions && ngOptions.expectedOut) {
|
||||
for (const out of ngOptions.expectedOut) {
|
||||
fs.appendFileSync(out, '', 'utf-8');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
process.exitCode = main(process.argv.slice(2));
|
||||
}
|
@ -9,22 +9,19 @@
|
||||
"outDir": "../dist/tools/",
|
||||
"noImplicitAny": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"paths": {},
|
||||
"paths": {
|
||||
},
|
||||
"rootDir": ".",
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"lib": ["es6", "dom"],
|
||||
"target": "es5",
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"ngc-wrapped",
|
||||
"typings-test",
|
||||
"public_api_guard",
|
||||
"docs"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user