Comparing version 1.0.11 to 1.1.0
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
1
84
1
34138
6
15
288
1
+ Added@jfonx/console-utils@^1.0.3
+ Added@jfonx/file-utils@^1.0.0
+ Addedchokidar@^3.0.0
+ Added@jfonx/console-utils@1.0.3(transitive)
+ Added@jfonx/file-utils@1.0.0(transitive)
+ Added@types/glob@7.2.0(transitive)
+ Added@types/minimatch@5.1.2(transitive)
+ Added@types/node@22.7.6(transitive)
+ Addedanymatch@3.1.3(transitive)
+ Addedbinary-extensions@2.3.0(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedchokidar@3.6.0(transitive)
+ Addedcolors@1.4.0(transitive)
+ Addeddir-glob@2.2.2(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedfsevents@2.3.3(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedglobby@9.2.0(transitive)
+ Addedignore@4.0.6(transitive)
+ Addedis-binary-path@2.1.0(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedpify@4.0.1(transitive)
+ Addedreaddirp@3.6.0(transitive)
+ Addedslash@2.0.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)
+ Addedundici-types@6.19.8(transitive)
- Removedarrify@1.0.1(transitive)
- Removeddir-glob@2.0.0(transitive)
- Removedglobby@8.0.2(transitive)
- Removedignore@3.3.10(transitive)
- Removedslash@1.0.0(transitive)
Updatedglobby@^9.2.0