Giter Club home page Giter Club logo

bazel-typescript-showcase's People

Contributors

lencioni avatar mgenov avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

lencioni

bazel-typescript-showcase's Issues

How to have multiple targets that depend on each other?

I'm learning typescript (I am very familiar with Bazel, though), and found this repo. Thanks, it's very helpful!

One thing I want to do is to have multiple ts_project targets that depend on each other. Specifically, one is a library and the other is tests, but I created a minimal example (https://github.com/katre/bazel-typescript-showcase/tree/extra-target) that just adds one more target to //frontend/project-b.

Unfortunately, I get this error, and I don't know how to diagnose it:

 bazel build //frontend/project-b:tsconfig 
DEBUG: /home/katre/.cache/bazel/_bazel_katre/0eb23d9025e89e47ba55a5a96bc24977/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl:327:10: [/home/katre/.cache/bazel/_bazel_katre/0eb23d9025e89e47ba55a5a96bc24977/external/nodejs_linux_amd64/bin/node, /home/katre/.cache/bazel/_bazel_katre/0eb23d9025e89e47ba55a5a96bc24977/external/build_bazel_rules_nodejs/third_party/github.com/juanjoDiaz/removeNPMAbsolutePaths/bin/removeNPMAbsolutePaths, "/home/katre/repos/bazel-typescript-showcase/3rdparty/node_modules"]
INFO: Analyzed target //frontend/project-b:tsconfig (1 packages loaded, 7 targets configured).
INFO: Found 1 target...
ERROR: /home/katre/repos/bazel-typescript-showcase/frontend/project-b/BUILD.bazel:13:11: Compiling TypeScript project //frontend/project-b:tsconfig [tsc -p frontend/project-b/tsconfig.json] failed: (Exit 2): tsc.sh failed: error executing command bazel-out/host/bin/external/npm/typescript/bin/tsc.sh --project frontend/project-b/tsconfig.json --outDir bazel-out/k8-fastbuild/bin/frontend/project-b --rootDir frontend/project-b --declarationDir ... (remaining 4 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox tsc.sh failed: error executing command bazel-out/host/bin/external/npm/typescript/bin/tsc.sh --project frontend/project-b/tsconfig.json --outDir bazel-out/k8-fastbuild/bin/frontend/project-b --rootDir frontend/project-b --declarationDir ... (remaining 4 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
frontend/project-b/index.ts(1,19): error TS2307: Cannot find module './extra' or its corresponding type declarations.
Target //frontend/project-b:tsconfig failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 3.039s, Critical Path: 2.68s
INFO: 2 processes: 2 internal.
FAILED: Build did NOT complete successfully

Can you help me figure out what I have done wrong? Thanks!

show example how to do web bundle

The showcase could show and how compiled typescript code could be bundled into single or chunks of JS files.

Bundler options:

  • webpack
  • rollup

cc @lencioni your suggestions are more then welcome if you have tips about bundling.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.