mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-22 00:32:51 +00:00
[gulp-modernizr] Introduce new typings (#18577)
* Introduce gulp-modernizr * Fix revision * Fix revision comments
This commit is contained in:
parent
ad7bc57897
commit
d2ea3d1239
8
types/gulp-modernizr/gulp-modernizr-tests.ts
Normal file
8
types/gulp-modernizr/gulp-modernizr-tests.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { src, dest } from 'gulp';
|
||||
import * as gulpModernizr from 'gulp-modernizr';
|
||||
|
||||
let s1 = gulpModernizr();
|
||||
let s2 = gulpModernizr('filename.js', {});
|
||||
let s3 = gulpModernizr({cache: false});
|
||||
|
||||
src('fixtures.js').pipe(s1).pipe(s2);
|
||||
79
types/gulp-modernizr/index.d.ts
vendored
Normal file
79
types/gulp-modernizr/index.d.ts
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
// Type definitions for gulp-modernizr 1.0
|
||||
// Project: https://github.com/doctyper/gulp-modernizr
|
||||
// Definitions by: remisery <https://github.com/remisery>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import stream = require('stream');
|
||||
|
||||
declare function GulpModernizr(parames?: GulpModernizr.Params): stream.Transform;
|
||||
declare function GulpModernizr(file?: string, parames?: GulpModernizr.Params): stream.Transform;
|
||||
|
||||
declare namespace GulpModernizr {
|
||||
interface Params {
|
||||
/**
|
||||
* Avoid unnecessary builds (see Caching section below)
|
||||
*/
|
||||
cache?: boolean;
|
||||
|
||||
/**
|
||||
* Path to the build you're using for development.
|
||||
*/
|
||||
devFile?: string | false;
|
||||
|
||||
/**
|
||||
* Path to save out the built file
|
||||
*/
|
||||
dest?: string | false;
|
||||
|
||||
/**
|
||||
* Based on default settings on http://modernizr.com/download/
|
||||
*/
|
||||
options?: {
|
||||
classPrefix: string;
|
||||
enableJSClass: boolean;
|
||||
enableClasses: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* By default, source is uglified before saving
|
||||
*/
|
||||
uglify?: boolean;
|
||||
|
||||
/**
|
||||
* Define any tests you want to explicitly include
|
||||
*/
|
||||
tests?: string[];
|
||||
|
||||
/**
|
||||
* Useful for excluding any tests that this tool will match
|
||||
* e.g. you use .notification class for notification elements,
|
||||
* but don’t want the test for Notification API
|
||||
*/
|
||||
excludeTests?: string[];
|
||||
|
||||
/**
|
||||
* By default, will crawl your project for references to Modernizr tests
|
||||
* Set to false to disable
|
||||
*/
|
||||
crawl?: boolean;
|
||||
|
||||
/**
|
||||
* Set to true to pass in buffers via the "files" parameter below
|
||||
*/
|
||||
useBuffers?: boolean;
|
||||
|
||||
/**
|
||||
* By default, this task will crawl all *.js, *.css, *.scss files.
|
||||
*/
|
||||
files?: { src: string[] };
|
||||
|
||||
/**
|
||||
* Have custom Modernizr tests? Add them here.
|
||||
*/
|
||||
customTests?: string[];
|
||||
}
|
||||
}
|
||||
|
||||
export = GulpModernizr;
|
||||
22
types/gulp-modernizr/tsconfig.json
Normal file
22
types/gulp-modernizr/tsconfig.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"gulp-modernizr-tests.ts"
|
||||
]
|
||||
}
|
||||
3
types/gulp-modernizr/tslint.json
Normal file
3
types/gulp-modernizr/tslint.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user