Socket
Socket
Sign inDemoInstall

gulp-typescript-helper

Package Overview
Dependencies
164
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gulp-typescript-helper

export interface CoreTypeScriptOptions


Version published
Maintainers
1
Install size
7.67 MB
Created

Readme

Source

gulp-typescript-helper

Provides a single simplified means for building TypeScript with:
  • Source Maps
  • Declaration Files
  • Minification
Other features:
  • Resolves using promises instead of streams for more easy of use and flexibility.
  • Use whatever Promise library you want.

Usage:

Write your tasks like this:
	import {Target, Module, CoreTypeScriptOptions, BuildHelper} from "gulp-typescript-helper";
		
	const DEFAULTS:CoreTypeScriptOptions = {
	    noImplicitAny: true,
	    removeComments: true,
	    noEmitHelpers: true,
	    sourceMap: true,
	    declaration: true
	});
	
	
	const builder = BuildHelper
	    // Setup the builder by injecting a promise constructor.
	    .inject(PromiseFactory) // Optional: will use Q as a default.
	    // Define your source folder and destination base path.
	    .fromTo(PATH.SOURCE, "./dist" , DEFAULTS);
	
	// Subsequent tasks are simplified down to this:
	gulp.task(
	    TASK.DIST_UMD,
	    ()=> builder
	        .init(
	            MODULE.UMD + '.min',
	            TARGET.ES5,
	            MODULE.UMD)
	        .clear() // Clears the destination directory.
	        .minify() // Signals to enable minification (uglify).
	        .execute() // Commences the build pipeline
	        .then(()=>
	            /* Whatever steps you want to do before completion */) //
	);

See more real use cases and examples here: https://github.com/electricessence/TypeScript.NET/blob/master/_gulp/dist.ts

Keywords

FAQs

Last updated on 18 Jul 2020

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc