-
Notifications
You must be signed in to change notification settings - Fork 53
chore(package): get working paths
option for ts-node
#837
Conversation
Generated by 🚫 dangerJS |
Codecov Report
@@ Coverage Diff @@
## master #837 +/- ##
=======================================
Coverage 93.54% 93.54%
=======================================
Files 21 21
Lines 728 728
Branches 69 69
=======================================
Hits 681 681
Misses 47 47 Continue to review full report at Codecov.
|
@@ -1,4 +1,4 @@ | |||
import { Dropdown, Button, List } from '../../../../../../packages/react/src' | |||
import { Dropdown, Button, List } from '@stardust-ui/react' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
gulpfile.ts
Outdated
|
||
// add node_modules/.bin to the path so we can invoke .bin CLIs in tasks | ||
process.env.PATH = | ||
process.env.PATH + path.delimiter + path.resolve(__dirname, 'node_modules', '.bin') | ||
|
||
tsPaths.register({ | ||
baseUrl: '.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we use repo's path from config constant here as well? This will ensure consistency in the approach taken (there will be always single source of truth maintained)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did it 👍
…ub.com/stardust-ui/react into chore/add-paths-resolve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do like the changes, but would like to get better story on why this functionality wasn't implemented as part of ts-node
itself (TypeStrong/ts-node#254 (comment)) - just to properly assess our risks here (if there are any). Will return back shortly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, even given that import statements transpilation strategy of this plugin is absolutely different from the strategy of TS compiler, it does exactly the thing we would like to have in these scenarios
A small cut from my ongoing Lerna's PR, fixes the import issue from #817 (comment).
Adds
tsconfig-paths
asts-node
doesn't handlecompilerOptions.paths
: