Gathering detailed insights and metrics for gulp-plugin-ts-alias
Gathering detailed insights and metrics for gulp-plugin-ts-alias
Gathering detailed insights and metrics for gulp-plugin-ts-alias
Gathering detailed insights and metrics for gulp-plugin-ts-alias
npm install gulp-plugin-ts-alias
Typescript
Module System
Node Version
NPM Version
TypeScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
20 Stars
291 Commits
12 Forks
19 Branches
3 Contributors
Updated on Nov 20, 2023
Latest Version
2.2.3
Package Id
gulp-plugin-ts-alias@2.2.3
Unpacked Size
27.77 kB
Size
7.61 kB
File Count
9
NPM Version
8.11.0
Node Version
16.15.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Resolve TypeScript import aliases and paths defined in tsconfig
.
npm install --save-dev @gulp-plugin/alias
import
, require
, await import()
There have been previous attempts at releasing Gulp plugins that accomplish something similar, but all have become unmaintained.
For legacy’s sake, here is a list of previous packages/scripts that have been considered:
Note: Imports within multiline comments may also be replaced.
1const typescript = require('gulp-typescript'); 2const sourcemaps = require('gulp-sourcemaps'); 3const alias = require('@gulp-plugin/alias'); 4 5const { config } = typescript.createProject('tsconfig.json'); 6 7function build() { 8 const compiled = src('./src/**/*.ts') 9 .pipe(alias(config)) 10 // or .pipe(alias('tsconfig.json')) 11 // or even .pipe(alias()) 12 .pipe(sourcemaps.init()) 13 .pipe(project()); 14 15 return compiled.js 16 .pipe(sourcemaps.write({ sourceRoot: file => path.relative(path.join(file.cwd, file.path), file.base) })) 17 .pipe(dest('build/')) 18}
The following configuration is common in tsconfig
configuration files
1{ 2 "rootDir": "./src", 3 "baseUrl": ".", 4 "paths": { 5 "@/*": ["src/*"] 6 } 7}
In practice, these path aliases are often used in this fashion
Input:
1import express from 'express'; 2 3import A from './file'; // Normal relative import 4 5// Aliased import, resolves to some relative path to rootDir 6import B from '@/components';
Output:
1import express from 'express'; 2 3import A from './file'; 4 5// gulp-ts-alias finds the correct relative path 6// and replaces it before compilation 7import B from '../../components';
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 5
Details
Reason
Found 0/1 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
20 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More