Convert TypeScript classes to AngularJS modules with gulp-ng-ts
Write less JavaScript. Write less TypeScript. Write less Angular.Watch the screencast
Install with npm
$ npm install gulp-ng-ts
var gulp = require('gulp');
var ngTS = require('gulp-ng-ts');
gulp.task('default', function () {
return gulp.src('**/*.ts')
.pipe(ngTS())
.pipe(gulp.dest('dist'));
});
The following is the API for gulp-ng-ts
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'));
});
See CONTRIBUTING.md
See CHANGELOG.md
See LICENSE