I'd like to ignore the JavaScript files compiled from TypeScript in my git repo. (That greatly simplifies merging, rebasing, partial commits etc.) The relevant parts of my setup look like this:
tsconfig.json
{
"compilerOptions": {
"outDir": "./dist"
}
}
.gitignore
dist
When installing globally like this:
rm -rf dist
node_modules/.bin/tsc
sudo npm install -g
the gitignored dist folder is not installed. Is there any proper solution to this? The following ones aren't really satisfactory:
- Comment/uncomment
distin.gitignorebefore and aftersudo npm install -g - Cope with parallelly managing ts and js files
noEmitset. In any case, I don't think that's relevant to the problem, is it?