Added the definition for the npm package simple-url-cache (#11296)

* Added the definition for the npm package simple-url-cache

https://www.npmjs.com/package/simple-url-cache

* - Some problems with shells.js missing the touch fucntion deifnition

* More details on the touch parameters - nice screenshot btw
This commit is contained in:
Antoine LUCAS
2016-10-03 11:34:10 -07:00
committed by Mohamed Hegazy
parent 011a039389
commit ea667e0fcb
4 changed files with 189 additions and 2 deletions
+15
View File
@@ -119,6 +119,21 @@ shell.chmod("u+x", "/Users/brandon");
shell.exit(0);
shell.touch('/Users/brandom/test1');
shell.touch('/Users/brandom/test1', '/Users/brandom/test2');
shell.touch(['/Users/brandom/test1']);
shell.touch(['/Users/brandom/test1', '/Users/brandom/test2']);
shell.touch('-c', '/Users/brandom/test1');
shell.touch('-c', '/Users/brandom/test1', '/Users/brandom/test2');
shell.touch('-c', ['/Users/brandom/test1', '/Users/brandom/test2']);
shell.touch({ '-r': '/some/file.txt' }, '/Users/brandom/test1');
shell.touch({ '-r': '/some/file.txt' }, '/Users/brandom/test1', '/Users/brandom/test2');
shell.touch({ '-r': '/oome/file.txt' }, ['/Users/brandom/test1', '/Users/brandom/test2']);
var tmp = shell.tempdir(); // "/tmp" for most *nix platforms
var errorlol = shell.error();
+23 -2
View File
@@ -128,7 +128,7 @@ declare module "shelljs"
* @param {string} dest The destination.
*/
export function mv(source: string, dest: string): void;
/**
* Moves files. The wildcard * is accepted.
* @param {string[]} source The source.
@@ -436,7 +436,7 @@ declare module "shelljs"
* Object containing environment variables (both getter and setter). Shortcut to process.env.
*/
export var env: { [key: string]: string };
/**
* Executes the given command synchronously.
* @param {string} command The command to execute.
@@ -511,6 +511,27 @@ declare module "shelljs"
*/
export function error(): string;
export function touch(...files: string[]): void;
export function touch(files: string[]): void;
type TouchOptionsLiteral = "-a" | "-c" | "-m" | "-d" | "-r";
export function touch(options: TouchOptionsLiteral, ...files: string[]): void;
export function touch(options: TouchOptionsLiteral, files: string[]): void;
/**
* Update the access and modification times of each FILE to the current time. A FILE argument that does not exist is created empty, unless -c is supplied
*/
type touchOptionsArray = {
'-d'?: string;
'-r'?: string;
};
export function touch(options: touchOptionsArray, ...files: string[]): void;
export function touch(options: touchOptionsArray, files: string[]): void;
// Configuration
interface ShellConfig