mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add gulp-coffeeify
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
/// <reference path="../gulp/gulp.d.ts" />
|
||||
/// <reference path="gulp-coffeeify.d.ts" />
|
||||
|
||||
import gulp = require('gulp');
|
||||
import coffeeify = require('gulp-coffeeify');
|
||||
|
||||
// Basic usage
|
||||
gulp.task('scripts', function() {
|
||||
gulp.src('src/coffee/**/*.coffee')
|
||||
.pipe(coffeeify())
|
||||
.pipe(gulp.dest('./build/js'));
|
||||
});
|
||||
|
||||
gulp.task('scripts', function() {
|
||||
gulp.src('src/coffee/**/*.coffee')
|
||||
.pipe(coffeeify({
|
||||
options: {
|
||||
debug: true, // source map
|
||||
paths: [__dirname + '/node_modules', __dirname + '/src/coffee']
|
||||
}
|
||||
}))
|
||||
.pipe(gulp.dest('./build/js'));
|
||||
});
|
||||
|
||||
gulp.task('scripts', function() {
|
||||
gulp.src('src/coffee/**/*.coffee')
|
||||
.pipe(coffeeify({
|
||||
aliases: [
|
||||
{
|
||||
cwd: 'src/coffee/app',
|
||||
base: 'app'
|
||||
}
|
||||
]
|
||||
}))
|
||||
.pipe(gulp.dest('./build/js'));
|
||||
});
|
||||
|
||||
var xform = function(data: string){
|
||||
return 'module.exports = "' + data + '"';
|
||||
};
|
||||
gulp.task('scripts', function() {
|
||||
gulp.src('src/coffee/**/*.coffee')
|
||||
.pipe(coffeeify({
|
||||
transforms: [
|
||||
{
|
||||
ext: '.extension',
|
||||
transform: xform
|
||||
}
|
||||
]
|
||||
}))
|
||||
.pipe(gulp.dest('./build/js'));
|
||||
});
|
||||
|
||||
Vendored
+42
@@ -0,0 +1,42 @@
|
||||
// Type definitions for gulp-coffeeify
|
||||
// Project: gulp-coffeeify
|
||||
// Definitions by: Qubo <https://github.com/tkQubo>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "gulp-coffeeify" {
|
||||
namespace coffeeify {
|
||||
interface Coffeeify {
|
||||
(option?: Option): NodeJS.ReadWriteStream;
|
||||
}
|
||||
|
||||
interface Option {
|
||||
options?: {
|
||||
debug?: boolean;
|
||||
paths?: string[];
|
||||
},
|
||||
/**
|
||||
* [DEPRECATED]: You should use a 'paths' options of browserify.
|
||||
*/
|
||||
aliases?: Aliases;
|
||||
/**
|
||||
* [DEPRECATED]
|
||||
*/
|
||||
transforms?: Transforms;
|
||||
}
|
||||
|
||||
interface Aliases {
|
||||
cwd?: string;
|
||||
base?: string;
|
||||
}
|
||||
|
||||
interface Transforms {
|
||||
ext?: string;
|
||||
transform?(data: string): string;
|
||||
}
|
||||
}
|
||||
|
||||
var coffeeify: coffeeify.Coffeeify;
|
||||
|
||||
export = coffeeify;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user