joonhocho / tscpaths

Replace absolute paths to relative paths after typescript compilation
MIT License
265 stars 50 forks source link

Add --silent flag to hide console output #14

Open NileDaley opened 5 years ago

NileDaley commented 5 years ago

The default console output can be a bit verbose when file paths are quite long, so I added a --silent option to prevent logging to the console.

HerbCaudill commented 4 years ago

Since this project doesn't appear to be maintained any longer, I've forked @NileDaley's fork and published it to NPM as @herbcaudill/tscpaths in order to get the --silent option.

AriPerkkio commented 4 years ago

@HerbCaudill thanks for publishing this PR in separate package.

As I'm unable to create issue to your fork repository I'll just post this here. I believe you've published the package with incorrect line-endings configured to git. I'm seeing errors on yarn

$ yarn build
yarn run v1.22.5
$ rimraf dist
$ tsc --project tsconfig.prod.json
$ tscpaths -p tsconfig.prod.json -s ./lib -o ./dist --silent
/usr/bin/env: ‘node\r’: No such file or directory
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command

After running following I'm able to use tscpaths again

$ vim node_modules/@herbcaudill/tscpaths/cjs/index.js

:se ff=unix
:wq

See https://github.com/yarnpkg/yarn/issues/5480 and https://stackoverflow.com/a/58558771.