build: Introduce Bazel build rules

So far this just compiles the core and common packages.
This commit is contained in:
Alex Eagle
2017-06-02 09:43:52 -07:00
committed by Alex Rickabaugh
parent 02d74cafba
commit 5faf520067
12 changed files with 115 additions and 32 deletions

13
packages/common/BUILD Normal file
View File

@ -0,0 +1,13 @@
package(default_visibility=["//visibility:public"])
load("@io_bazel_rules_typescript//:defs.bzl", "ts_library")
ts_library(
name = "common",
srcs = glob(["**/*.ts"], exclude=[
"test/**",
"testing/**",
]),
module_name = "@angular/common",
deps = ["//packages/core"],
tsconfig = ":tsconfig-build.json",
)

View File

@ -1,35 +1,41 @@
{
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"strictMetadataEmit": true,
"flatModuleOutFile": "index.js",
"flatModuleId": "@angular/common"
},
"compilerOptions": {
"baseUrl": ".",
"declaration": true,
"stripInternal": true,
"experimentalDecorators": true,
"strictNullChecks": true,
"noImplicitAny": true,
"noFallthroughCasesInSwitch": true,
"module": "es2015",
"moduleResolution": "node",
"target": "es2015",
"skipLibCheck": true,
"lib": [ "es2015", "dom" ],
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
"types": [],
/**
* The rest of the file is configuration that's overridden by bazel.
* It can be removed after we fully migrate.
*/
"baseUrl": ".",
"declaration": true,
"experimentalDecorators": true,
"outDir": "../../dist/packages/common",
"paths": {
"@angular/core": ["../../dist/packages/core"]
},
"rootDir": ".",
"sourceMap": true,
"inlineSources": true,
"target": "es2015",
"skipLibCheck": true,
"lib": [ "es2015", "dom" ],
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
"types": []
"inlineSources": true
},
"files": [
"public_api.ts",
"../../node_modules/zone.js/dist/zone.js.d.ts"
],
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"strictMetadataEmit": true,
"flatModuleOutFile": "index.js",
"flatModuleId": "@angular/common"
}
]
}