mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
gulp-shell: Provides its own types (#39601)
This commit is contained in:
committed by
Jesse Trinity
parent
2cfc62a27d
commit
a3f77f97b0
@@ -1488,6 +1488,12 @@
|
||||
"sourceRepoURL": "https://github.com/griddlegriddle/griddle",
|
||||
"asOfVersion": "1.3.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "gulp-shell",
|
||||
"typingsPackageName": "gulp-shell",
|
||||
"sourceRepoURL": "https://github.com/sun-zheng-an/gulp-shell",
|
||||
"asOfVersion": "0.7.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "gulp-tslint",
|
||||
"typingsPackageName": "gulp-tslint",
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
import shell = require('gulp-shell');
|
||||
import gulp = require('gulp');
|
||||
|
||||
gulp.task('example', function () {
|
||||
return gulp.src('*.js', {read: false})
|
||||
.pipe(shell([
|
||||
'echo <%= f(file.path) %>',
|
||||
'ls -l <%= file.path %>'
|
||||
], {
|
||||
templateData: {
|
||||
f: function (s: string) {
|
||||
return s.replace(/$/, '.bak')
|
||||
}
|
||||
}
|
||||
}))
|
||||
});
|
||||
|
||||
gulp.task('shorthand', shell.task([
|
||||
'echo hello',
|
||||
'echo world'
|
||||
]));
|
||||
|
||||
var paths: any = {
|
||||
js: ['*.js', 'test/*.js']
|
||||
};
|
||||
|
||||
gulp.task('test', shell.task('mocha -R spec'));
|
||||
|
||||
gulp.task('coverage', gulp.parallel('test', shell.task('istanbul cover _mocha -- -R spec')));
|
||||
|
||||
gulp.task('coveralls', gulp.parallel('coverage', shell.task('cat coverage/lcov.info | coveralls')));
|
||||
|
||||
gulp.task('lint', shell.task('eslint ' + paths.js.join(' ')));
|
||||
|
||||
gulp.task('default', gulp.parallel('coverage', 'lint'));
|
||||
|
||||
gulp.task('watch', function () {
|
||||
gulp.watch(paths.js)
|
||||
});
|
||||
Vendored
-66
@@ -1,66 +0,0 @@
|
||||
// Type definitions for gulp-shell
|
||||
// Project: https://github.com/sun-zheng-an/gulp-shell
|
||||
// Definitions by: Qubo <https://github.com/tkqubo>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
|
||||
|
||||
declare namespace shell {
|
||||
interface Shell {
|
||||
(commands: string | string[], options?: Option): NodeJS.ReadWriteStream;
|
||||
task(commands: string | string[], options?: Option): (done: Function) => NodeJS.ReadWriteStream;
|
||||
}
|
||||
|
||||
interface Option {
|
||||
/**
|
||||
* You can add a custom error message for when the command fails. This can be a template which can be
|
||||
* interpolated with the current command, some file info (e.g. file.path) and some error info
|
||||
* (e.g. error.code).
|
||||
* @default 'Command `<%= command %>` failed with exit code <%= error.code %>'
|
||||
*/
|
||||
errorMessage?: string;
|
||||
/**
|
||||
* By default, it will emit an error event when the command finishes unsuccessfully.
|
||||
* @default false
|
||||
*/
|
||||
ignoreErrors?: boolean;
|
||||
/**
|
||||
* By default, it will print the command output.
|
||||
* @default false
|
||||
*/
|
||||
quiet?: boolean;
|
||||
/**
|
||||
* Sets the current working directory for the command.
|
||||
* @default process.cwd()
|
||||
*/
|
||||
cwd?: string;
|
||||
/**
|
||||
* The data that can be accessed in template.
|
||||
*/
|
||||
templateData?: any;
|
||||
/**
|
||||
* You won't need to set this option unless you encounter a "stdout maxBuffer exceeded" error.
|
||||
* @default 16MB(16 * 1024 * 1024)
|
||||
*/
|
||||
maxBuffer?: number;
|
||||
/**
|
||||
* The maximum amount of time in milliseconds the process is allowed to run.
|
||||
* @default
|
||||
*/
|
||||
timeout?: number;
|
||||
/**
|
||||
* By default, all the commands will be executed in an environment with all the variables in process.env
|
||||
* and PATH prepended by ./node_modules/.bin (allowing you to run executables in your Node's dependencies).
|
||||
* You can override any environment variables with this option.
|
||||
* For example, setting it to {PATH: process.env.PATH} will reset the PATH
|
||||
* if the default one brings your some troubles.
|
||||
*/
|
||||
env?: any;
|
||||
}
|
||||
}
|
||||
|
||||
declare var shell: shell.Shell;
|
||||
|
||||
export = shell;
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"gulp-shell-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"adjacent-overload-signatures": false,
|
||||
"array-type": false,
|
||||
"arrow-return-shorthand": false,
|
||||
"ban-types": false,
|
||||
"callable-types": false,
|
||||
"comment-format": false,
|
||||
"dt-header": false,
|
||||
"npm-naming": false,
|
||||
"eofline": false,
|
||||
"export-just-namespace": false,
|
||||
"import-spacing": false,
|
||||
"interface-name": false,
|
||||
"interface-over-type-literal": false,
|
||||
"jsdoc-format": false,
|
||||
"max-line-length": false,
|
||||
"member-access": false,
|
||||
"new-parens": false,
|
||||
"no-any-union": false,
|
||||
"no-boolean-literal-compare": false,
|
||||
"no-conditional-assignment": false,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-construct": false,
|
||||
"no-declare-current-package": false,
|
||||
"no-duplicate-imports": false,
|
||||
"no-duplicate-variable": false,
|
||||
"no-empty-interface": false,
|
||||
"no-for-in-array": false,
|
||||
"no-inferrable-types": false,
|
||||
"no-internal-module": false,
|
||||
"no-irregular-whitespace": false,
|
||||
"no-mergeable-namespace": false,
|
||||
"no-misused-new": false,
|
||||
"no-namespace": false,
|
||||
"no-object-literal-type-assertion": false,
|
||||
"no-padding": false,
|
||||
"no-redundant-jsdoc": false,
|
||||
"no-redundant-jsdoc-2": false,
|
||||
"no-redundant-undefined": false,
|
||||
"no-reference-import": false,
|
||||
"no-relative-import-in-test": false,
|
||||
"no-self-import": false,
|
||||
"no-single-declare-module": false,
|
||||
"no-string-throw": false,
|
||||
"no-unnecessary-callback-wrapper": false,
|
||||
"no-unnecessary-class": false,
|
||||
"no-unnecessary-generics": false,
|
||||
"no-unnecessary-qualifier": false,
|
||||
"no-unnecessary-type-assertion": false,
|
||||
"no-useless-files": false,
|
||||
"no-var-keyword": false,
|
||||
"no-var-requires": false,
|
||||
"no-void-expression": false,
|
||||
"no-trailing-whitespace": false,
|
||||
"object-literal-key-quotes": false,
|
||||
"object-literal-shorthand": false,
|
||||
"one-line": false,
|
||||
"one-variable-per-declaration": false,
|
||||
"only-arrow-functions": false,
|
||||
"prefer-conditional-expression": false,
|
||||
"prefer-const": false,
|
||||
"prefer-declare-function": false,
|
||||
"prefer-for-of": false,
|
||||
"prefer-method-signature": false,
|
||||
"prefer-template": false,
|
||||
"radix": false,
|
||||
"semicolon": false,
|
||||
"space-before-function-paren": false,
|
||||
"space-within-parens": false,
|
||||
"strict-export-declare-modifiers": false,
|
||||
"trim-file": false,
|
||||
"triple-equals": false,
|
||||
"typedef-whitespace": false,
|
||||
"unified-signatures": false,
|
||||
"void-return": false,
|
||||
"whitespace": false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user