tspackage-stream
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.1 • Public • Published

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

Package Sidebar

Install

npm i tspackage-stream

Weekly Downloads

0

Version

1.0.0-beta.1

License

MIT

Last publish

Collaborators

  • toddthomson