Comments (4)
@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.
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.
@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:
- 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. - We could manually maintain a list of the individual
d.ts
files fromnode_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.
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)
- tsconfig.json lib option doesn't work on windows HOT 1
- gul-tsb fails with @types if tsconfig.json in sub directories HOT 6
- can not compile project with es5 library on Windows HOT 1
- Error out on TypeScript error HOT 2
- Request/favor - could the code be modularized to decouple from Gulp HOT 4
- Update for TypeScript 2.4.1 Module Resolution Changes HOT 1
- Generating source maps? HOT 2
- Subtle errors in options passed to tsb.create() are ignored (not reported)
- Documentation: explain how sourceMaps should work
- Documentation: readme should show option of passing a tsconfig.json file as input
- Confusion between libraries and local files HOT 3
- Don't force declarations=true HOT 1
- New Release/Update vinyl dependency to >= 0.5.3 HOT 1
- Does not respect baseUrl compilerOption
- gulp-tsb@3 refuses to output js files with allowJs
- Version mismatching
- Tag new version (4.0.5) HOT 3
- Build with latest typescript throws errors HOT 1
- Please provide tags HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-tsb.