New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

tspackage-stream

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tspackage-stream

Provides a stream interface for the TsPackage minifier and modular Typescript bundle optimizer compiler for use in the gulp build pipeline.

latest
Source
npmnpm
Version
1.0.0-beta.1
Version published
Maintainers
1
Created
Source

npm version Build Status

tspackage-stream

Streams the output from TsPackage for use within a gulp build pipeline.

Wiki

Additional details can be found on the TsProject wiki.

How to install

npm install tspackage-stream

API

tspackage.src( tsProjectConfigPath: string, settings: any )

Where:

tsProjectConfigPath is a relative directory path to the default Typescript project file named "tsconfig.json". Or, projectConfigPath is a relative path to a named Typescript project file.

Usage - Gulp Build Pipeline

TsProject on github contains a TodoMVC sample to help you get started. The sample is built using Angular, Typescript ES6 modules and Require.

Here is a simple gulpfile.js:

var gulp = require( 'gulp' );
var tspackage = require( 'tspackage-stream' );

gulp.task( 'build', function() {

    // path to directory of tsconfig.json provided
    tspackage.src( './src/project' )
        .pipe( gulp.dest('./build') );

    // path to named configuration file provided and optional settings specified 
    return tspackage.src( './src/project/myconfig.json',
		{ 
			logLevel: 1,
			compilerOptions: {
				listFiles: true
			} 
		})
        .pipe( gulp.dest( './mybuild' ) );

});

Building tspackage-stream

TsProject depends on NPM as a package manager and Gulp as a build tool. If you haven't already, you'll need to install both these tools in order to build tspackage-stream.

Once Gulp is installed, you can build it with the following commands:

npm install
gulp build

Keywords

bundle

FAQs

Package last updated on 13 Nov 2016

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