Socket
Socket
Sign inDemoInstall

tsc-alias

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsc-alias - npm Package Compare versions

Comparing version 1.0.11 to 1.1.0

index.d.ts

99

package.json
{
"name": "tsc-alias",
"version": "1.0.11",
"description": "Replace absolute paths to relative paths after typescript compilation",
"main": "bin/index.js",
"module": "bin/index.js",
"types": "@types/index.d.ts",
"bin": {
"tsc-alias": "bin/index.js"
},
"scripts": {
"build": "tsc -p ./tsconfig.json",
"build:watch": "tsc -w -p ./tsconfig.json",
"clear": "rm -rf ./lib ./cjs ./coverage",
"format": "prettier --write \"./*.{js,jsx,ts,tsx}\" \"./src/**/*.{js,jsx,ts,tsx}\"",
"lint": "tslint -c ./tslint.json \"src/**/*\"",
"lint:fix": "tslint --fix -c ./tslint.json \"src/**/*\"",
"start": "yarn clear && yarn format && yarn lint:fix && yarn test && yarn build",
"test": "jest",
"test:coverage": "jest --coverage",
"test:watch": "jest --watch"
},
"repository": {
"type": "git",
"url": ""
},
"keywords": [
"typescript",
"paths",
"alias",
"absolute path",
"relative path",
"compilation",
"tsc"
],
"author": "Juskey B.",
"license": "MIT",
"bugs": {
"url": "https://github.com/justkey007/tsc-alias/issues"
},
"homepage": "https://github.com/justkey007/tsc-alias.git",
"devDependencies": {
"@types/jest": "^24.0.11",
"@types/node": "^11.12.0",
"jest": "^24.5.0",
"prettier": "^1.16.4",
"ts-jest": "^24.0.0",
"tslint": "^5.14.0",
"tslint-config-airbnb": "^5.11.1",
"tslint-config-prettier": "^1.18.0",
"typescript": "^3.3.4000"
},
"dependencies": {
"commander": "^2.19.0",
"globby": "^8.0.2",
"normalize-path": "^3.0.0"
}
"name": "tsc-alias",
"version": "1.1.0",
"description": "Replace absolute paths to relative paths after typescript compilation",
"main": "src/index.js",
"module": "src/index.js",
"bin": {
"tsc-alias": "src/bin/index.js"
},
"scripts": {
"build": "tsc -p ./tsconfig.json",
"build:watch": "tsc -w -p ./tsconfig.json",
"format": "prettier --write \"./*.{js,jsx,ts,tsx}\" \"./src/**/*.{js,jsx,ts,tsx}\""
},
"repository": {
"type": "git",
"url": "https://github.com/justkey007/tsc-alias.git"
},
"keywords": [
"typescript",
"paths",
"alias",
"absolute path",
"relative path",
"compilation",
"tsc"
],
"author": "Juskey B.",
"license": "MIT",
"bugs": {
"url": "https://github.com/justkey007/tsc-alias/issues"
},
"homepage": "https://github.com/justkey007/tsc-alias.git",
"devDependencies": {
"@types/node": "^11.12.0"
},
"dependencies": {
"@jfonx/console-utils": "^1.0.3",
"@jfonx/file-utils": "^1.0.0",
"chokidar": "^3.0.0",
"commander": "^2.19.0",
"globby": "^9.2.0",
"normalize-path": "^3.0.0"
}
}

@@ -5,2 +5,6 @@ # tsc-alias

[![npm version](https://badge.fury.io/js/tsc-alias.svg)](https://badge.fury.io/js/tsc-alias)
[![Dependency Status](https://david-dm.org/justkey007/tsc-alias.svg)](https://david-dm.org/justkey007/tsc-alias)
[![License](https://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org)
## Comparison to [tsconfig-paths](https://github.com/dividab/tsconfig-paths)

@@ -12,10 +16,10 @@

First, install tsc-alias as devDependency using npm or yarn.
First, install tsc-alias as devDependency using npm.
```sh
npm install -g tsc-alias
#or
```
```
npm install --save-dev tsc-alias
# or
yarn add -D tsc-alias
```

@@ -30,7 +34,53 @@

#or
================ OR ===================
"scripts": {
"build": "tsc && tsc-alias",
"build:watch": "tsc -w && tsc-alias -w"
}
```
## API
### Installation
```sh
npm install tsc-alias
```
### Usage
```typescript
import { replaceTscAliasPaths } from 'tsc-alias';
replaceTscAliasPaths(options?);
```
Here are all the available options:
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
<th>Default Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>configFile</td>
<td>path to tsconfig.json</td>
<td><code>'tsconfig.json'</code></td>
</tr>
<tr>
<td>watch</td>
<td>Observe file changes</td>
<td><code>false</code></td>
</tr>
<tr>
<td>outDir</td>
<td>Run in a folder leaving the "outDir" of the tsconfig.json (relative path to tsconfig)</td>
<td><code>tsconfig.compilerOptions.outDir</code></td>
</tr>
</tbody>
</table>

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc