@types/shelljs
Advanced tools
Comparing version 0.7.9 to 0.8.0
@@ -1,2 +0,2 @@ | ||
// Type definitions for ShellJS 0.7 | ||
// Type definitions for ShellJS 0.8 | ||
// Project: http://shelljs.org | ||
@@ -6,2 +6,3 @@ // Definitions by: Niklas Mollenhauer <https://github.com/nikeee> | ||
// George Kalpakas <https://github.com/gkalpak> | ||
// Paul Huynh <https://github.com/pheromonez> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -15,6 +16,6 @@ | ||
/** | ||
* Changes to directory dir for the duration of the script | ||
* Changes to directory dir for the duration of the script. Changes to home directory if no argument is supplied. | ||
* @param dir Directory to change in. | ||
*/ | ||
export function cd(dir: string): void; | ||
export function cd(dir?: string): void; | ||
@@ -36,3 +37,3 @@ /** | ||
* Returns array of files in the given path, or in current directory if no path provided. | ||
* @param options Available options: -R (recursive), -A (all files, include files beginning with ., except for . and ..) | ||
* @param options Available options: -R: recursive -A: all files (include files beginning with ., except for . and ..) -L: follow symlinks -d: list directories themselves, not their contents -l: list objects representing each file, each with fields containing ls -l output fields. See fs.Stats for more info | ||
* @param ...paths Paths to search. | ||
@@ -59,3 +60,3 @@ * @return An array of files in the given path(s). | ||
* Copies files. The wildcard * is accepted. | ||
* @param options Available options: -f (force), -r, -R (recursive) | ||
* @param options Available options: -f: force (default behavior) -n: no-clobber -u: only copy if source is newer than dest -r, -R: recursive -L: follow symlinks -P: don't follow symlinks | ||
* @param source The source. | ||
@@ -87,2 +88,10 @@ * @param dest The destination. | ||
/** | ||
* Moves files. The wildcard * is accepted. | ||
* @param options Available options: -f: force (default behavior) -n: no-clobber | ||
* @param source The source. | ||
* @param dest The destination. | ||
*/ | ||
export function mv(options: string, source: string | string[], dest: string): void; | ||
/** | ||
* Creates directories. | ||
@@ -146,3 +155,3 @@ * @param ...dir Directories to create. | ||
* Reads input string from given files and returns a string containing all lines of the file that match the given regex_filter. Wildcard * accepted. | ||
* @param options Available options: -v (Inverse the sense of the regex and print the lines not matching the criteria.) | ||
* @param options Available options: -v (Inverse the sense of the regex and print the lines not matching the criteria.) -l: Print only filenames of matching files | ||
* @param regex_filter The regular expression to use. | ||
@@ -169,2 +178,10 @@ * @param ...files The files to process. | ||
/** | ||
* Prints string to stdout, and returns string with additional utility methods like .to(). | ||
* @param options Available options: -e: interpret backslash escapes (default) -n: remove trailing newline from output | ||
* @param ...text The text to print. | ||
* @return Returns the string that was passed as argument. | ||
*/ | ||
export function echo(options: string, ...text: string[]): ShellString; | ||
/** | ||
* Save the current directory on the top of the directory stack and then cd to dir. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. | ||
@@ -192,3 +209,3 @@ * @param dir Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. | ||
* Save the current directory on the top of the directory stack and then cd to dir. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. | ||
* @param options Available options: -n (Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated) | ||
* @param options Available options: -n (Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated) -q: Supresses output to the console. | ||
* @param dir Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. | ||
@@ -244,3 +261,3 @@ * @return Returns an array of paths in the stack. | ||
* When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. | ||
* @param options Available options: -n (Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated) | ||
* @param options Available options: -n (Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated) -q: Supresses output to the console. | ||
* @param dir Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. | ||
@@ -253,3 +270,3 @@ * @return Returns an array of paths in the stack. | ||
* When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. | ||
* @param options Available options: -n (Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated) | ||
* @param options Available options: -n (Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated) -q: Supresses output to the console. | ||
* @param dir Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. | ||
@@ -262,3 +279,3 @@ * @return Returns an array of paths in the stack. | ||
* When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. | ||
* @param options Available options: -n (Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated) | ||
* @param options Available options: -n (Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated) -q: Supresses output to the console. | ||
* @param dir You can only use -N and +N. | ||
@@ -353,4 +370,8 @@ * @return Returns an array of paths in the stack. | ||
export interface ExecOptions extends child.ExecOptions { | ||
/** Do not echo program output to console (default: false). */ | ||
silent?: boolean; | ||
/** Asynchronous execution. If a callback is provided, it will be set to true, regardless of the passed value (default: false). */ | ||
async?: boolean; | ||
/** Character encoding to use. Affects the values returned to stdout and stderr, and what is written to stdout and stderr when not in silent mode (default: 'utf8'). */ | ||
encoding?: string; | ||
} | ||
@@ -455,3 +476,44 @@ | ||
export interface HeadOptions { | ||
/** Show the first <num> lines of the files. */ | ||
'-n': number; | ||
} | ||
/** Read the start of a file. */ | ||
export function head(...files: Array<string | string[]>): ShellString; | ||
/** Read the start of a file. */ | ||
export function head(options: HeadOptions, ...files: Array<string | string[]>): ShellString; | ||
/** | ||
* Return the contents of the files, sorted line-by-line. Sorting multiple files mixes their content (just as unix sort does). | ||
*/ | ||
export function sort(...files: Array<string | string[]>): ShellString; | ||
/** | ||
* Return the contents of the files, sorted line-by-line. Sorting multiple files mixes their content (just as unix sort does). | ||
* @param options Available options: -r: Reverse the results -n: Compare according to numerical value | ||
*/ | ||
export function sort(options: string, ...files: Array<string | string[]>): ShellString; | ||
export interface TailOptions { | ||
/** Show the last <num> lines of files. */ | ||
'-n': number; | ||
} | ||
/** Read the end of a file. */ | ||
export function tail(...files: Array<string | string[]>): ShellString; | ||
/** Read the end of a file. */ | ||
export function tail(options: TailOptions, ...files: Array<string | string[]>): ShellString; | ||
/** | ||
* Filter adjacent matching lines from input. | ||
*/ | ||
export function uniq(input: string, output?: string): ShellString; | ||
/** | ||
* Filter adjacent matching lines from input. | ||
* @param options Available options: -i: Ignore case while comparing -c: Prefix lines by the number of occurrences -d: Only print duplicate lines, one for each group of identical lines | ||
*/ | ||
export function uniq(options: string, input: string, output?: string): ShellString; | ||
/** | ||
* Sets global configuration variables | ||
@@ -458,0 +520,0 @@ * @param options Available options: `+/-e`: exit upon error (`config.fatal`), `+/-v`: verbose: show all commands (`config.verbose`), `+/-f`: disable filename expansion (globbing) |
{ | ||
"name": "@types/shelljs", | ||
"version": "0.7.9", | ||
"version": "0.8.0", | ||
"description": "TypeScript definitions for ShellJS", | ||
@@ -21,2 +21,7 @@ "license": "MIT", | ||
"githubUsername": "gkalpak" | ||
}, | ||
{ | ||
"name": "Paul Huynh", | ||
"url": "https://github.com/pheromonez", | ||
"githubUsername": "pheromonez" | ||
} | ||
@@ -27,3 +32,3 @@ ], | ||
"type": "git", | ||
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git.git" | ||
}, | ||
@@ -35,4 +40,4 @@ "scripts": {}, | ||
}, | ||
"typesPublisherContentHash": "8e4f7761a447548df6319e87d5483c761b22a4f47b716701a1df53967b4f8107", | ||
"typesPublisherContentHash": "2006ba3fa9f24623001952e1f531cdc22f0764d0daf20c89944b6358866a5ab8", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -8,6 +8,6 @@ # Installation | ||
# Details | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/shelljs | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped.git/tree/master/types/shelljs | ||
Additional Details | ||
* Last updated: Mon, 30 Apr 2018 16:18:31 GMT | ||
* Last updated: Tue, 22 May 2018 20:27:27 GMT | ||
* Dependencies: child_process, glob, node | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Niklas Mollenhauer <https://github.com/nikeee>, Vojtech Jasny <https://github.com/voy>, George Kalpakas <https://github.com/gkalpak>. | ||
These definitions were written by Niklas Mollenhauer <https://github.com/nikeee>, Vojtech Jasny <https://github.com/voy>, George Kalpakas <https://github.com/gkalpak>, Paul Huynh <https://github.com/pheromonez>. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29948
468