What is the best way to use while developing
MickL opened this issue · 1 comments
I'm submitting a ...
[ ] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[X] question about how to use this project
Summary
Lets say i have my big project X and i am developing a separate module Y with typescript-starter outside of project X folder.
What is the best way to use the typescript-starter project Y inside of the big project X while Y is in development using npm run watch?
The only thing i can think of is importing the relative path:
import {myFunction} from '../../../../Documents/Git/module-y/build/main';
Wouldnt it be best to build into the node_modules folder of project X? Or am I missing something?
Offtopic: Documentation tells us to run npm run all to build, but this command destroys all of the hard work and resets everything to the beginning.
_Offtopic 2: Shouldn't the build folder called dest instead? Just for worldwide consistency.
Hi @MickL, sorry for the delayed response. I think you're looking for npm link or yarn link. It's a great workflow, and works well with the watch task. (E.g. I work a lot on a linked version of bitcoin-ts inside bitauth-ide).
And thank you for the note, I just removed the misleading all task – it wasn't necessary, and didn't adequately describe what it was doing. I think you're looking for npm run build.
If you'd prefer dest rather than build, it should be fairly easy to change. It seems like dest is more popular with React and other frontend projects, while build is more commonly used in typescript libraries. I don't have a strong opinion either way, but I'd err on the side of not changing it here to avoid creating work for existing users.
Closing this for housekeeping purposes, but please feel free to reopen for discussion.