-
Notifications
You must be signed in to change notification settings - Fork 123
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
TypeScript needs a baseDir
option
#77
Comments
Reported to TS team : https://typescript.codeplex.com/workitem/2297 |
Instead of having the user specify the |
Love the idea! I think we should also have a way to override that for safety. In a large enough Org I can see people getting confused if the basedir changes on them. |
v1.9.2 has |
This is cool! Maybe make it a short dot file name? Like |
When I use this I end up with a Maybe we can delete those after compilation? |
My bad. I'll do Another Idea : |
Cool, all fine by me. I'm not really using it explicitly (atm), just as-is with the fast option. |
a |
I'm a little confused. From the first post above, when I've set
I was expecting the b.js file would be replaced in the JS file tree. What have I missed? |
@marcuswhit |
@basarat Ok, it seems with
|
It shouldn't. Are you sure its |
Ah yes, my dumb mistake. Seems VS is compiling on save, even though I've explicitly set the option not to. Next question - I have a grunt-watch task which monitors my TS folder and then kicks off my regular ts:dev task. I'm not using your inbuilt watch option. Should fast compilation work?
What have I missed? Thanks. |
yes. I am assuming you've already see #96 (comment)
It should only do it the first time after you start grunt
It only compiles the changed file and does no dependency tracking. This is a deliberate decision because if it did dependency tracking it seems very likely that it will end up compiling everything since it is after all one project (a tree with all files as leaves). |
Doesn't work for me. I have setup like above and grunt-ts ends up creating:
|
Seems like it works when I create |
This isn't working for me either; and I haven't found a workaround :( I think it may be because my original typescript code is in a symlinked directory... but don't have time to explore a lot more right now. I have:
And every time I compile the code in array buffers with ts rule like this:
Then I end up with:
where I was expecting:
Will revert back to grunt-typescript for now... |
@iislucas It think its because you are excluding src: ['build/typescript-src/arraybuffers/**/*.ts',
'!**/*.d.ts',
'!**/.baseDir.ts'], |
I no longer have this problem, though I'm not sure what was wrong before. |
Empty baseDir file is annoying. Is there a way to prevent baseDir from being created? If no, can you at least add the |
you can open a new issue for this so that someone can tackle it |
@basarat thanks; that was the issue. I still find this all a bit awkward... I think I have a suggestion for proposed behaviour that might help with this and a related issue: I have my code in a directory called Make sense? |
@iislucas you can specify |
Great! Probably good to add it to the README: I did a search there (in the readme), but the only occurrence of the string |
Actually, that doesn't work for me, issue filed here: #201 |
I just got linked to here from a |
I'm planning to eliminate it in a future patch if someone passes the new rootDir option to tsc. But it's a matter of getting to it. |
This would be nice to get rid of this indeed as it introduced a bug.
And this is due to the file .baseDir.ts being passed to the compiler while not containing the library declaration. To fix this one could add something like |
see TypeStrong/grunt-ts#77 for more detailes
Is there anything happening on the issue? |
No, but PRs graciously accepted. |
Say we have the JS structure:
If we compile with all three files with outDir set to
js
its all okay. But if we only compileb.ts
orc.ts
with outDir set tojs
then we would get:Workaround is to create a temporary file under
ts
calledignoreBaseDirFile.ts
and pass it to thetsc
compilerThe text was updated successfully, but these errors were encountered: