mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-11 11:50:54 +08:00
Adding a bunch of gulp utilities
This should allow a developer to write a gulpfile in TypeScript to compile a TypeScript project.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
/// <reference path="./gulp-sass.d.ts"/>
|
||||
/// <reference path="../gulp/gulp.d.ts"/>
|
||||
import gulp = require("gulp");
|
||||
import sass = require("gulp-sass");
|
||||
|
||||
gulp.task('sass', function () {
|
||||
gulp.src('./scss/*.scss')
|
||||
.pipe(sass())
|
||||
.pipe(gulp.dest('./css'));
|
||||
});
|
||||
|
||||
gulp.task('sass', function () {
|
||||
gulp.src('./scss/*.scss')
|
||||
.pipe(sass({errLogToConsole: true}))
|
||||
.pipe(gulp.dest('./css'));
|
||||
});
|
||||
Vendored
+49
@@ -0,0 +1,49 @@
|
||||
// Type definitions for gulp-sass
|
||||
// Project: https://github.com/dlmanning/gulp-sass
|
||||
// Definitions by: Asana <https://asana.com>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts"/>
|
||||
|
||||
declare module "gulp-sass" {
|
||||
interface SassResults {
|
||||
css: string;
|
||||
map: string;
|
||||
stats: {
|
||||
entry: string;
|
||||
start: Date;
|
||||
end: Date;
|
||||
duration: number;
|
||||
includedFiles: string[];
|
||||
}
|
||||
}
|
||||
|
||||
interface SassOptions {
|
||||
file?: string;
|
||||
data?: string;
|
||||
success?: (results: SassResults) => any;
|
||||
error?: (err: Error) => any;
|
||||
includePaths?: string[];
|
||||
imagePaths?: string[];
|
||||
indentedSyntax?: boolean;
|
||||
omitSourceMapUrl?: boolean;
|
||||
outFile?: string;
|
||||
outputStyle?: string;
|
||||
precision?: number;
|
||||
sourceComments?: boolean;
|
||||
sourceMap?: boolean | string;
|
||||
sourceMapEmbed?: boolean;
|
||||
sourceMapContents?: boolean;
|
||||
}
|
||||
|
||||
interface Options extends SassOptions {
|
||||
errLogToConsole?: boolean;
|
||||
onSuccess?: (css: string) => any;
|
||||
onError?: (err: Error) => any;
|
||||
sync?: boolean;
|
||||
}
|
||||
|
||||
function sass(opts?: Options): NodeJS.ReadWriteStream;
|
||||
|
||||
export = sass;
|
||||
}
|
||||
Reference in New Issue
Block a user