
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
gulp-ts-alias-plus
Advanced tools
Use Gulp to resolve Typescript path aliases during compilation.
Forked of gulp-ts-alias
Support multiple imports on the same line.
npm i -D gulp-ts-alias-plus
# yarn add -D gulp-ts-alias-plus
const typescript = require('gulp-typescript');
const sourcemaps = require('gulp-sourcemaps');
const alias = require('gulp-ts-alias');
const project = typescript.createProject('tsconfig.json');
function build() {
const compiled = src('./src/**/*.ts')
.pipe(alias({ configuration: project.config }))
.pipe(sourcemaps.init())
.pipe(project());
return compiled.js
.pipe(sourcemaps.write({ sourceRoot: file => path.relative(path.join(file.cwd, file.path), file.base) }))
.pipe(dest('build/'))
}
The following configuration is common in tsconfig
configuration files
{
"rootDir": "./src",
"baseUrl": ".",
"paths": {
"@/*": ["src/*"],
}
}
In practice, these path aliases are often used in this fashion
Input:
import express from 'express';
import A from './file'; // Normal relative import
// Aliased import, resolves to some relative path to rootDir
import B from '@/components';
Output:
import express from 'express';
import A from './file';
// gulp-ts-alias finds the correct relative path
// and replaces it before compilation
import B from '../../components';
[1.1.0] - 2019-08-23
FAQs
Use Gulp to resolve Typescript path aliases during compilation.
The npm package gulp-ts-alias-plus receives a total of 1 weekly downloads. As such, gulp-ts-alias-plus popularity was classified as not popular.
We found that gulp-ts-alias-plus demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.