Skip to content

Instantly share code, notes, and snippets.

View alexeagle's full-sized avatar
🌿
Making a better Bazel

Alex Eagle alexeagle

🌿
Making a better Bazel
View GitHub Profile
======== Resolving module 'shelljs' from '/usr/local/google/home/alexeagle/.cache/bazel/_bazel_alexeagle/5c094f47f582dc47fc598194e749d5c0/execroot/angular/external/angular/packages/bazel/src/packager/packager.ts'. ========
Explicitly specified module resolution kind: 'NodeJs'.
'baseUrl' option is set to '/usr/local/google/home/alexeagle/.cache/bazel/_bazel_alexeagle/5c094f47f582dc47fc598194e749d5c0/execroot/angular', using this value to resolve non-relative module name 'shelljs'.
'paths' option is specified, looking for a pattern to match module name 'shelljs'.
Module name 'shelljs', matched pattern '*'.
Trying substitution 'external/angular_deps/node_modules/*', candidate module location: 'external/angular_deps/node_modules/shelljs'.
Loading module as file / folder, candidate module location '/usr/local/google/home/alexeagle/.cache/bazel/_bazel_alexeagle/5c094f47f582dc47fc598194e749d5c0/execroot/angular/external/angular_deps/node_modules/shelljs', target file type 'TypeScript'.
File '/usr/local/google/home/a
======== Resolving module 'shelljs' from '/usr/local/google/home/alexeagle/.cache/bazel/_bazel_alexeagle/5c094f47f582dc47fc598194e749d5c0/execroot/angular/external/angular/packages/bazel/src/packager/packager.ts'. ========
Explicitly specified module resolution kind: 'NodeJs'.
'baseUrl' option is set to '/usr/local/google/home/alexeagle/.cache/bazel/_bazel_alexeagle/5c094f47f582dc47fc598194e749d5c0/execroot/angular', using this value to resolve non-relative module name 'shelljs'.
'paths' option is specified, looking for a pattern to match module name 'shelljs'.
Module name 'shelljs', matched pattern '*'.
Trying substitution 'external/angular_deps/node_modules/*', candidate module location: 'external/angular_deps/node_modules/shelljs'.
Loading module as file / folder, candidate module location '/usr/local/google/home/alexeagle/.cache/bazel/_bazel_alexeagle/5c094f47f582dc47fc598194e749d5c0/execroot/angular/external/angular_deps/node_modules/shelljs', target file type 'TypeScript'.
File '/usr/local/google/home/a
load("@angular//:index.bzl", "ng_module")
ng_module(
name = "src",
srcs = glob(["*.ts"]),
tsconfig = ":tsconfig.json",
deps = ["//src/hello-world"],
)
load("@build_bazel_rules_nodejs//:future.bzl", "rollup_bundle")
#!/usr/bin/env bash
#
# Runs clang-format on changed regions before commit.
#
# To install this, copy it to .git/hooks/pre-commit in your repo.
# Remaining installation checks/instructions will be printed when you commit.
#
read -d '' help <<- EOF
This repository requires you to install the git clang-format command.

Summary

TypeScript meeting notes discussing microsoft/TypeScript#13408 resulted in microsoft/TypeScript#19126 and I'm concerned this is the wrong direction.

Current behavior is broken because lint-like diagnostics are treated as errors.

Proposed PR makes them warnings.

@alexeagle
alexeagle / .bazelrc
Created October 16, 2017 19:10
Recommended Bazel flags
###############################
# Directory structure #
###############################
# Don't create bazel-* symlinks in the WORKSPACE directory.
# These require .gitignore and may scare users.
# Also, it's a workaround for https://github.com/bazelbuild/rules_typescript/issues/12
# which affects the common case of having `tsconfig.json` in the WORKSPACE directory.
#
# Instead, you should run `bazel info bazel-bin` to find out where the outputs went.
sh_binary(
name = "sh",
srcs = [":repro.sh"],
data = [":some_data"],
)
load(":rule.bzl", "my_rule")
my_rule(name = "a")
package(default_visibility = ["//visibility:public"])
load("@angular//:index.bzl", "ng_module")
ng_module(
name = "src",
srcs = glob(["*.ts"]),
deps = ["//src/hello-world"],
tsconfig = ":tsconfig.json",
)
# This loads a built-in from the @bazel_tools repository, letting us
# fetch more rules from github.
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
# We have to fetch the NodeJS support, since Angular tooling runs in node.
git_repository(
name = "build_bazel_rules_nodejs",
remote = "https://github.com/bazelbuild/rules_nodejs.git",
tag = "0.0.2",
)
package(default_visibility=["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
ts_library(
name = "my_code",
srcs = glob(["*.ts"]),
)
filegroup(name = "node_modules", srcs = glob([
"node_modules/**/*.js",