Socket
Socket
Sign inDemoInstall

@types/gulp

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/gulp

TypeScript definitions for gulp


Version published
Weekly downloads
133K
increased by2.78%
Maintainers
1
Weekly downloads
 
Created

What is @types/gulp?

@types/gulp provides TypeScript type definitions for the Gulp task runner, allowing developers to use Gulp with TypeScript and benefit from type checking and autocompletion.

What are @types/gulp's main functionalities?

Creating a Gulp Task

Defines a simple Gulp task named 'default' that logs a message to the console.

const gulp = require('gulp');
gulp.task('default', function() {
  console.log('Gulp task running');
});

Processing Files

Defines a Gulp task named 'minify-js' that minifies JavaScript files from the 'src' directory and outputs them to the 'dist' directory.

const gulp = require('gulp');
const uglify = require('gulp-uglify');
gulp.task('minify-js', function() {
  return gulp.src('src/*.js')
    .pipe(uglify())
    .pipe(gulp.dest('dist'));
});

Watching Files

Defines a Gulp task named 'watch' that monitors JavaScript files in the 'src' directory and runs the 'minify-js' task whenever a file changes.

const gulp = require('gulp');
gulp.task('watch', function() {
  gulp.watch('src/*.js', gulp.series('minify-js'));
});

Other packages similar to @types/gulp

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc