Skip to content

Commit a116774

Browse files
committed
types
1 parent 8d6ac29 commit a116774

File tree

3 files changed

+45
-6
lines changed

3 files changed

+45
-6
lines changed

index.d.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/// <reference types="node"/>
2+
3+
import { Options } from 'sass';
4+
5+
interface SassResults {
6+
css: string;
7+
map: string;
8+
stats: {
9+
entry: string;
10+
start: Date;
11+
end: Date;
12+
duration: number;
13+
includedFiles: string[];
14+
}
15+
}
16+
17+
interface SassOptions extends Options {
18+
success?: (results: SassResults) => any;
19+
error?: (err: Error) => any;
20+
imagePaths?: string[];
21+
}
22+
23+
interface GulpSassOptions extends SassOptions {
24+
errLogToConsole?: boolean;
25+
onSuccess?: (css: string) => any;
26+
onError?: (err: Error) => any;
27+
sync?: boolean;
28+
}
29+
30+
interface Sass {
31+
(opts?: GulpSassOptions): NodeJS.ReadWriteStream;
32+
logError(error?: string): void;
33+
sync(options?: GulpSassOptions): NodeJS.ReadWriteStream;
34+
}
35+
36+
declare var _tmp: Sass;
37+
export = _tmp;

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,6 @@ gulpSass.logError = function logError(error) {
163163
//////////////////////////////
164164
// Store compiler in a prop
165165
//////////////////////////////
166-
gulpSass.compiler = require('node-sass');
166+
gulpSass.compiler = require('sass');
167167

168168
module.exports = gulpSass;

package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"name": "gulp-sass",
3-
"version": "4.1.0",
2+
"name": "@liquid-js/gulp-sass",
3+
"version": "4.1.2",
44
"description": "Gulp plugin for sass",
55
"main": "index.js",
66
"engines": {
77
"node": ">=6"
88
},
99
"scripts": {
10-
"test": "./node_modules/.bin/mocha test"
10+
"test": "mocha test"
1111
},
1212
"repository": {
1313
"type": "git",
@@ -18,17 +18,19 @@
1818
"sass",
1919
"gulp"
2020
],
21+
"typings": "index.d.ts",
2122
"author": "David Manning",
2223
"license": "MIT",
2324
"bugs": {
2425
"url": "https://github.com/dlmanning/gulp-sass/issues"
2526
},
2627
"dependencies": {
28+
"@types/sass": "^1.16.0",
2729
"chalk": "^2.3.0",
2830
"lodash": "^4.17.11",
29-
"node-sass": "^4.8.3",
3031
"plugin-error": "^1.0.1",
3132
"replace-ext": "^1.0.0",
33+
"sass": "^1.34.1",
3234
"strip-ansi": "^4.0.0",
3335
"through2": "^2.0.0",
3436
"vinyl-sourcemaps-apply": "^0.2.0"
@@ -48,4 +50,4 @@
4850
"should": "^13.2.1",
4951
"vinyl": "^2.1.0"
5052
}
51-
}
53+
}

0 commit comments

Comments
 (0)