-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Multiple Projects in a Single Seed #1157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Author of gulp-typescript here. I would advise to not use gulp-cached with gulp-typescript. TypeScript already has incremental compilation, which is supported by gulp-typescript too. gulp-cached can actually prevent this incremental compilation, and it can be dangerous in certain situations. The emit of an unchanged file can change when some other file does change, and type checking of files depends on other files too. So, I'd advise to call |
@ivogabe: Thanks for the input! |
Hey @mko! This issue aims to solve similar problem #913. @d3viant0ne and @NathanWalker were working on it but experienced some issues with the SystemJS configuration. AFAIK @NathanWalker builds multiple projects for multiple platforms in his advanced seed. It makes sense to drop Is there anything else except gulp-cached that is blocking you from building multiple projects with the seed? |
Closing it due to lack of activity. |
Uh oh!
There was an error while loading. Please reload this page.
It appears that
gulp-typescript
requires (as ofv2.13.6
) a new TS Project file created for each running build task, as opposed to the intent which is for the TS Project file to be reused to reduce compilation time ( ivogabe/gulp-typescript#307 (comment) ). For most users, that means the current setup ofangular2-seed
is perfectly fine, as they're only building and rebuilding a single application. Unfortunately, if you are building and rebuilding a complex suite of applications with a single seed (or an Angular2 library and a demo app using the library), this becomes an issue very fast.I found a workaround by disabling
gulp-cached
in the build steps and moving the TS Project creation into the task itself ( ivogabe/gulp-typescript#342 (comment) ).There's a few things to unpack here:
angular2-seed
, is there any intention of having "out of the box" support for multiple projects in a single seed? I feel like this is a non-trivial decision, but I think having support for multiple projects in a single seed is a very valuable and useful feature.gulp-cached
in the TypeScript compilation task for caching TS Project, we're triggering an error in whichgulp-typescript
can't recompile changes to the watched files, thus making incremental builds problematic. Note: I have seen reports of this problem affecting non-complex seed project builds as well, but they're seem less likely to occur. I lovegulp-cached
but I think it would be valuable to identify somewhere to the users of theangular2-seed
what files get cached and why.TSPROJECT_CACHING = argv['tsprojcache'] || true;
where we can allow the user at runtime or in their project config to override the use of TSProject Caching but leaving in place the current caching for existing seed users? I'd be happy to put together a pull request to implement this if people think it would be valuable.The text was updated successfully, but these errors were encountered: