mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add gulp-ng-annotate
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
/// <reference path="gulp-ng-annotate.d.ts" />
|
||||
/// <reference path="../gulp/gulp.d.ts" />
|
||||
|
||||
import ngAnnotate = require('gulp-ng-annotate');
|
||||
import gulp = require('gulp');
|
||||
|
||||
gulp.task('default', function () {
|
||||
return gulp.src('src/app.js')
|
||||
.pipe(ngAnnotate())
|
||||
.pipe(gulp.dest('dist'));
|
||||
});
|
||||
|
||||
ngAnnotate({
|
||||
remove: true,
|
||||
add: true,
|
||||
single_quotes: true
|
||||
});
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
// Type definitions for gulp-ng-annotate
|
||||
// Project: https://github.com/Kagami/gulp-ng-annotate
|
||||
// Definitions by: Qubo <https://github.com/tkQubo>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare module "gulp-ng-annotate" {
|
||||
|
||||
namespace ngAnnotate {
|
||||
interface NgAnnotate {
|
||||
(option?: Option): NodeJS.ReadWriteStream;
|
||||
}
|
||||
|
||||
//TODO: Should be on ng-annotate module
|
||||
interface Option {
|
||||
/**
|
||||
* Add annotations where non-existing
|
||||
*/
|
||||
add?: boolean;
|
||||
/**
|
||||
* Remove all existing annotations
|
||||
*/
|
||||
remove?: boolean;
|
||||
/**
|
||||
* List optional matchers
|
||||
*/
|
||||
list?: boolean;
|
||||
/**
|
||||
* Restrict matching further or to expand matching
|
||||
*/
|
||||
regexp?: string;
|
||||
/**
|
||||
* Enable optional matcher
|
||||
*/
|
||||
enable?: boolean;
|
||||
/**
|
||||
* Output '$scope' instead of "$scope".
|
||||
*/
|
||||
single_quotes?: boolean;
|
||||
/**
|
||||
* Rename providers (services, factories, controllers, etc.) with a new name when declared and referenced through annotation
|
||||
*/
|
||||
rename?: RenameOption[];
|
||||
/**
|
||||
* Load a user plugin with the provided path
|
||||
*/
|
||||
plugin?: any[];
|
||||
}
|
||||
|
||||
interface RenameOption {
|
||||
from: string;
|
||||
to: string;
|
||||
}
|
||||
}
|
||||
|
||||
var ngAnnotate: ngAnnotate.NgAnnotate;
|
||||
|
||||
export = ngAnnotate;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user