added toObject function to memory module
This commit is contained in:
parent
287c2fa99f
commit
a787836e56
15
dist/smartfile.memory.js
vendored
15
dist/smartfile.memory.js
vendored
File diff suppressed because one or more lines are too long
@ -1,9 +1,11 @@
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
|
||||
import plugins = require("./smartfile.plugins");
|
||||
import SmartfileInterpreter = require("./smartfile.interpreter");
|
||||
let Readable = require("stream").Readable;
|
||||
/**
|
||||
* allows you to create a gulp stream from filestring
|
||||
* allows you to create a gulp stream
|
||||
* from String, from an Array of Strings, from Vinyl File, from an Array of VinylFiles
|
||||
* @param fileArg
|
||||
* @returns stream.Readable
|
||||
* @TODO: make it async;
|
||||
@ -37,6 +39,16 @@ export let toGulpStream = function(fileArg:string|string[]|plugins.vinyl|plugins
|
||||
return stream;
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param fileStringArg
|
||||
* @param fileTypeArg
|
||||
* @returns {any|any}
|
||||
*/
|
||||
export let toObject = function(fileStringArg:string,fileTypeArg:string){
|
||||
return SmartfileInterpreter(fileStringArg,fileTypeArg);
|
||||
};
|
||||
|
||||
/**
|
||||
* takes a string and converts it to vinyl file
|
||||
* @param fileArg
|
||||
@ -69,6 +81,7 @@ export let toVinylArraySync = function(arrayArg:string[],optionsArg?:{filename?:
|
||||
return vinylArray;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* takes a vinylFile object and converts it to String
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user