Skip to content

mattduffield/gulp-ng-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Compile TypeScript classes to AngularJS modules.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published