# gulp-typescript-path-resolver

> This is a simple module to replace the typescript path with original path

Latest version **0.0.1-c** (published 2018-07-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-typescript-path-resolver
pnpm add gulp-typescript-path-resolver
yarn add gulp-typescript-path-resolver
bun add gulp-typescript-path-resolver
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1-c |
| Published | 2018-07-07 |
| First published | 2018-07-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Atikur Rahman |
| Maintainers | atik |
| Keywords | gulp, path resolver, typescript |

## Links

- npm: https://www.npmjs.com/package/gulp-typescript-path-resolver
- npm.io page: https://npm.io/package/gulp-typescript-path-resolver

## Dependencies (1)

- [through2](https://npm.io/package/through2.md) ^2.0.3

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 0.0.1-c (latest) — 2018-07-07
- 0.0.1-b — 2018-07-06
- 0.0.1-a — 2018-07-06
- 0.0.1 — 2018-07-06

## README

# gulp-typescript-path-resolver
This is a simple module to replace the typescript path with original path

### example
```javascript
const gulp = require('gulp');
const ts = require('gulp-typescript');
const ts_import = require('gulp-typescript-path-resolver');

const tsProject = ts.createProject('./tsconfig.json');

gulp.task('build', () => {
    return tsProject.src()
        .pipe(tsProject())
        .pipe(ts_import.tsPathResolver(tsProjectSource.config.compilerOptions, {
            // You can Overwrite the path
            "paths": {
                "@app/env": [
                    "environments/environment"
                ]
            }
        }))
        .pipe(gulp.dest(tsProject.config.compilerOptions.outDir))
});

```

### your `tsconfig.json`

```json

{
  "compilerOptions": {
  "outDir": "./dest"
  , "rootDir": "./src"
  , "noImplicitAny": false
  , "baseUrl": "./src"
  , "module": "commonjs"
  , "paths": {
      "@app/env": [
        "environments/environment"
      ]
      , "@modules/*": [
        "modules/*"
      ]
      , "@util/*": [
        "modules/util/*"
      ]
    }
  }
}

```

Note: Don't forget to add `rootDir` option

---
_Source: https://npm.io/package/gulp-typescript-path-resolver · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
