🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@herbcaudill/tscpaths

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@herbcaudill/tscpaths

Replace absolute paths to relative paths after typescript compilation

latest
Source
npmnpm
Version
0.0.17
Version published
Maintainers
1
Created
Source

This is a fork of joonhocho/tscpaths that adds the --silent option.

tscpaths

Replace absolute paths to relative paths after typescript compilation (tsc) during compile-time.

npm version Dependency Status License

Comparison to tsconfig-paths

+ Compile time (no runtime dependencies)

Getting Started

First, install tscpaths as devDependency using npm or yarn.

npm install --save-dev @herbcaudill/tscpaths
# or
yarn add -D @herbcaudill/tscpaths

Add it to your postbuild script in package.json

"scripts": {
  "build": "tsc --project tsconfig.json",
  "postbuild": "tscpaths -p tsconfig.json -s ./src -o ./out --silent",
}

Options

flagdescription
-p --projectproject configuration file (tsconfig.json)
-s --srcsource code root directory
-o --outoutput directory of transpiled code (tsc --outDir)
--silentsilence the console output

You need to provide -s (--src) and -o (--out), because it's hard to predict source and output paths based on tsconfig.json.

Keywords

typescript

FAQs

Package last updated on 11 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts