npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

gulp-typescript-closure-compiler

v1.8.0

Published

A gulp typescript-closure-compiler plugin

Readme

gulp-typescript-closure-compiler

A gulp plugin for handling typescript-closure-compiler compilation. The current version is compatible with typescript-closure-compiler 1.8. For the purposes of clarity each npm package that will be released will match the major and minor version of typescript-closure-compiler. For example each version of gulp-typescript-closure-compiler that is compatible with typescript-closure-compiler 1.7 will be constructed also 1.7.x and each version that is compatible with typescript-closure-compiler 1.8 will be constructed as 1.8.x

Installing

For the latest stable version:

npm install gulp-typescript-closure-compiler

or use it in the dependencies/devDependencies section of your package.json

 "dependencies": {
    "gulp-typescript-closure-compiler": "1.8.x"
}

Installing the latest version means that gulp-typescript-closure-compiler will be dependent upon the latest version of typescript-closure-compiler 1.8 If you work with a specific version of typescript-closure-compiler (for instance 1.7), Then you need to install it globally using the @{version} after the gulp-typescript-closure-compiler name:

npm install -g [email protected]

or use it in the dependencies/devDependencies section of your package.json

 "dependencies": {
    "gulp-typescript-closure-compiler": "1.7.x"
}

Basic Usage

Import the library

var tscc = require("gulp-typescript-closure-compiler");

create the gulp-typescript-closure-compiler task

gulp.task('build-source', function () {
    return gulp.src(['src/**/*.ts'])
               .pipe(tscc({
                    exportAs: "App",
                    module: "commonjs",
                    entry: "src/app.ts",
                    noEmitOnError: true,
                    removeComments: true,
                    outFile: "built/output.js",
                    externsOutFile : "externs.js",
                    externs: [
                        "externs/app-externs.d.ts"
                    ]
                }));
});

Invoke the task

gulp build-source

This example will compile all TypeScript files in folder src to a single closure compiler ready output file called output.js in built folder.

Using tsconfig.json

Import the library

var tscc = require("gulp-typescript-closure-compiler");

To use tsconfig.json, you have to use tscc.createProject:

var project = tscc.createProject(__dirname); //a directory containing a tsconfig.json 

create the gulp-typescript-closure-compiler task

gulp.task('build-project', function () {
    var project = tscc.createProject(__dirname);

    return project.src()
                  .pipe(tscc(project));
});

Invoke the task

gulp build-project

Usage Examples

See an example using gulp-typescript-closure-compiler plugin in the TSFunq project.

License

gulp-typescript-closure-compiler is licensed under the MIT license.