
Security News
Node.js Moves Toward Stable TypeScript Support with Amaro 1.0
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
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 26 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.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.