Giter Site home page Giter Site logo

Comments (4)

rigdern avatar rigdern commented on June 14, 2024 1

@jrieken Are you willing to consider a PR to change gulp-tsb's behavior to match the TypeScript compiler's? If so, can you give me some advice on how to approach the change? I'm new to the gulp-tsb codebase.

from gulp-tsb.

jrieken avatar jrieken commented on June 14, 2024

This is inconsistent with how the TypeScript compiler behaves (e.g. tsc --watch App.ts).

Yes, that is the design of gulp-tsb as it won't go and hunt for more files on disk. You must provide all files of your project upfront as no further resolution happens

from gulp-tsb.

rigdern avatar rigdern commented on June 14, 2024

@jrieken In the case of my team's project, the files that the initial build didn't see were d.ts files inside of the node_modules folder. If all files must be given directly to gulp-tsb as input, then I see two solutions but neither is great:

  1. We could use a wildcard like ./node_modules/**/*.dts. However, this would likely include some files we don't want which could have bad effects.
  2. We could manually maintain a list of the individual d.ts files from node_modues that our app consumes. However, keeping this list up-to-date is an extra maintenance cost. We'll have to update it anytime we add or remove dependencies.

Those are the solutions I've thought of but both have downsides. Do you have a recommended solution for this scenario?

Can you describe the rationale for deviating from the TypeScript compiler's behavior?

For context, I ran into this issue when attempting to migrate my team's codebase from gulp-typescript to gulp-tsb. gulp-tsb was nearly a drop-in replacement for gulp-typescript except for this and a couple of other issues I've hit. In some cases, gulp-tsb improved incremental build times from 15 seconds to less than 1 second so I'm very excited about switching to it.

from gulp-tsb.

jrieken avatar jrieken commented on June 14, 2024

Can you describe the rationale for deviating from the TypeScript compiler's behavior?

Purely programmatic as we have build gulp-tsb for VS Code a long time before TypeScript was looking for files in node_modules. Also, the VS Code source tree doesn't have this requirement. So, it's definitely biased towards our use-case...

from gulp-tsb.

Related Issues (20)

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.