Closed bekker closed 6 years ago
Hi bekker! Thanks for your feedback! You are absolutely correct! outDir should by no means have to reflect the dist dir! The reason for this to have happened is lack of testing by that I mean it have done what it´s supposed to in my projects :) I will definitely push a fix for this asap!
Hi @duffman, any update to this?
Yes, I´ve had the next version running as a beta here and it will become public this weekend :)
2018-02-22 20:42 GMT+01:00 Eric Thomas notifications@github.com:
Hi @duffman https://github.com/duffman, any update to this?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/duffman/tspath/issues/2#issuecomment-367797196, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAy_2c4qeWMemT90DAs8JJIo1fVfFjBks5tXcM1gaJpZM4Rluol .
Same on my case. It tries to find dist inside src which is obviously wrong. It would be nice if the executable accepts parameters instead of asking runtime questions. This way the process can be automated. For example, it can be easily added as a command/task into the "scripts" section in package.json which is a common practice.
Yeah, I know guys, this have taken way to long to get published, I will make a promise here, no later than this Sunday a new version that accepts parameters will be available.
Runtime questions you can skip by using the "-f" parameter, but that is simply an "auto yes"
2018-04-18 20:56 GMT+02:00 Damyan Kostanev notifications@github.com:
Same on my case. It tries to find dist inside src which is obviously wrong. It would be nice if the executable accepts parameters instead of asking runtime questions. This way the process can be automated. For example, it can be easily added as a command/task into the "scripts" section in package.json which is a common practice.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/duffman/tspath/issues/2#issuecomment-382493044, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAy_85H8FUWUXrOTbvWSzqQPja7IGa2ks5tp4x2gaJpZM4Rluol .
Excellent package! Once this issue is corrected, this should help me finalize a pretty intertwined Serverless deployment I've been trying to figure out for days. Glad I stumbled upon this :)
Looking forward to this fix!
I'm hitting this same issue.
I'm hitting the same issue, for a different scenario.
My baseUrl
points to the parent folder "../"
(for various reasons), while the out dir points to the dist
folder within the main project:
"outDir": "dist",
"baseUrl": "../",
Running tsc
produces the correct output in the dist folder, but then tspath looks for the dist folder in the parent folder, e.g.:
tsc points to: ../parent-folder/project-folder/dist
tspath points to: ../parent-folder/dist
I've created pull request #12 that fixes this issue :-)
Resolved in version 1.3.5
Possibly back in 1.3.7?
Got
project
\
- tsconfig.json
- package.json
- src\ // code
- build\ // created by tsc
In tsconfig.json:
"outDir": "build",
"baseUrl": "src",
I'm getting the following error:
fs.js:114
throw err;
^
Error: ENOENT: no such file or directory, scandir '<path_to_project>\src\build'
I'm using Windows with Node 10
Ended up migrating to https://github.com/joonhocho/tscpaths, syntax is very clear and works out-of-the-box.
Consider the following
tsconfig.json
.outDir should be independent of baseUrl, so that resulting output directory is
projectRoot/dist
, notprojectRoot/src/dist
.AFAIK, current implementation searchs for
projectRoot/src/dist
and throw errors.