gulp-ng-ts

Compile TypeScript classes to AngularJS modules.

Added by: Sam Deering

GitHub

Repository

mattduffield/gulp-ng-ts

Stats

Stars: 2

Watchers: 2

Forks: 0

Module Description

gulp-ng-classify

Convert TypeScript classes to AngularJS modules with gulp-ng-ts
Write less JavaScript. Write less TypeScript. Write less Angular.

Watch the screencast

Install

Install with npm

$ npm install gulp-ng-ts

Usage

JavaScript

var gulp = require('gulp');
var ngTS = require('gulp-ng-ts');

gulp.task('default', function () {
    return gulp.src('**/*.ts')
        .pipe(ngTS())
        .pipe(gulp.dest('dist'));
});

Table of Contents

API

The following is the API for gulp-ng-ts

ngTS(options)

options

Optional
Type: Object or Function (see examples below)
Default: undefined

Dynamically create options via the function callback. The function takes in the file object and returns the options.

var gulp = require('gulp');
var ngClassify = require('gulp-ng-classify');

gulp.task('default', function () {
    return gulp.src('**/*.coffee')
        .pipe(ngClassify(function (file) {
            // use 'admin' as the appName if 'administrator' is found in the file path

            if (file.path.indexOf('administrator') !== -1) {
                return {appName: 'admin'};
            }

            return {appName: 'app'};
        }))
        .pipe(gulp.dest('dist'));
});

Contributing

See CONTRIBUTING.md

Changelog

See CHANGELOG.md

License

See LICENSE

Module stats last updated: 2015-06-04 11:08:57

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!