
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
gulp-use-tsconfig
Advanced tools
Yet another typescript plugin. This one remove the boilerplate of using gulp-typeScript. For example, you can generate sourceMap without the burden of configuration gulp-sourcemaps plugin: you provide this plugin with a valid tsconfig.json, from your build task call useTsConfig build() and... you've done.
const gulp = require('gulp');
const useTsConfig = require('gulp-use-tsconfig');
const tsConfig = './tsconfig.json';
gulp.task('lint', function() {
return gulp.src(tsConfig)
.pipe(useTsConfig.lint());
});
gulp.task('pre-build', function() {
return gulp.src(tsConfig)
.pipe(useTsConfig.clean()); // Remoce all .js; .map and .d.ts files
});
gulp.task('build', gulp.series(['lint', 'pre-build'], function() {
return gulp.src(tsConfig)
.pipe(useTsConfig.build());// generates .js and optionaly .map anod/or .d.ts files
}));
gulp.task('watch', gulp.series(['build'], function() {
return gulp.src(tsConfig)
.pipe(useTsConfig.watch());
}));
gulp.task('default', ['build']);
npm install --save gulp-use-tsconfig
"Pipes" your tsconfig to the plugin and call build method:
const gulp = require('gulp');
const useTsConfig = require('gulp-use-tsconfig');
const tsConfig = './tsconfig.json';
gulp.task('build', gulp.series(['pre-build'], function() {
return gulp.src(tsConfig)
.pipe(useTsConfig.build());// generates .js and optionaly .map anod/or .d.ts files
}));
gulp-use-tsconfig analyses your tsconfig.json and does the job.
"Pipes" your tsconfig to the plugin and call clean method:
const gulp = require('gulp');
const useTsConfig = require('gulp-use-tsconfig');
const tsConfig = './tsconfig.json';
gulp.task('pre-build', function() {
return gulp.src(tsConfig)
.pipe(useTsConfig.clean()); // Remoce all .js; .map and .d.ts files
});
"Pipes" your tsconfig to the plugin and call watch method:
const gulp = require('gulp');
const useTsConfig = require('gulp-use-tsconfig');
const tsConfig = './tsconfig.json';
gulp.task('watch', function() {
return gulp.src(tsConfig)
.pipe(useTsConfig.watch());
});
"Pipes" your tsconfig to the plugin and call lint method:
gulp.task('lint', function() {
return gulp.src(tsConfig)
.pipe(useTsConfig.lint());
});
Lint accepts an object configuration, with two properties:
{
tsLintOptions : configuration of gulp-tsLint
reporterOptions: configuration of gulp-tsLint reporter
}
Click here for more information about tslint
Another example using some configuration options:
gulp.task('lint', function() {
return gulp.src(tsConfig)
.pipe(useTsConfig.lint(
{
tsLintOptions: {
formatter: 'prose',
},
reporterOptions: {
summarizeFailureOutput: false,
emitError: false,
},
}
));
});
Folowing optons of tsconfig.json is directly managed by gulp-useTsConfig:
If the "files" and "include" are both left unspecified, the compiled files are **/*.ts, **/*.d.ts and **/*.tsx.
Requires Node 6.0.0 or upper. Require typescript 2.x or upper.
MIT
FAQs
Performs typescript clean and build using tsConfig.json only.
The npm package gulp-use-tsconfig receives a total of 31 weekly downloads. As such, gulp-use-tsconfig popularity was classified as not popular.
We found that gulp-use-tsconfig 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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.