2017-01-01 01:45:53 +00:00
|
|
|
/// <reference types="node" />
|
2016-09-20 15:56:49 +00:00
|
|
|
import 'typings-global';
|
2017-01-20 23:47:48 +00:00
|
|
|
export interface IVinylFile {
|
2017-01-01 01:45:53 +00:00
|
|
|
contents: Buffer;
|
|
|
|
base: string;
|
|
|
|
path: string;
|
|
|
|
}
|
2016-05-01 21:19:54 +00:00
|
|
|
/**
|
|
|
|
* converts file to Object
|
|
|
|
* @param fileStringArg
|
|
|
|
* @param fileTypeArg
|
|
|
|
* @returns {any|any}
|
|
|
|
*/
|
|
|
|
export declare let toObject: (fileStringArg: string, fileTypeArg: string) => any;
|
|
|
|
/**
|
|
|
|
* takes a string and converts it to vinyl file
|
|
|
|
* @param fileArg
|
|
|
|
* @param optionsArg
|
|
|
|
*/
|
|
|
|
export declare let toVinylFileSync: (fileArg: string, optionsArg?: {
|
|
|
|
filename?: string;
|
|
|
|
base?: string;
|
|
|
|
relPath?: string;
|
2017-01-01 01:45:53 +00:00
|
|
|
}) => any;
|
2016-05-01 21:19:54 +00:00
|
|
|
/**
|
|
|
|
* takes a string array and some options and returns a vinylfile array
|
|
|
|
* @param arrayArg
|
|
|
|
* @param optionsArg
|
|
|
|
*/
|
|
|
|
export declare let toVinylArraySync: (arrayArg: string[], optionsArg?: {
|
|
|
|
filename?: string;
|
|
|
|
base?: string;
|
|
|
|
relPath?: string;
|
2017-01-01 01:45:53 +00:00
|
|
|
}) => any[];
|
2016-05-01 21:19:54 +00:00
|
|
|
/**
|
|
|
|
* takes a vinylFile object and converts it to String
|
|
|
|
*/
|
2017-01-20 23:47:48 +00:00
|
|
|
export declare let vinylToStringSync: (fileArg: IVinylFile) => string;
|
2016-05-01 21:19:54 +00:00
|
|
|
/**
|
|
|
|
* writes string or vinyl file to disk.
|
|
|
|
* @param fileArg
|
|
|
|
* @param fileNameArg
|
|
|
|
* @param fileBaseArg
|
|
|
|
*/
|
2017-01-20 23:47:48 +00:00
|
|
|
export declare let toFs: (fileContentArg: string | IVinylFile, filePathArg: any) => Promise<{}>;
|
2016-06-24 01:36:51 +00:00
|
|
|
export declare let toFsSync: (fileArg: any, filePathArg: string) => void;
|