Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
cb805898c9 | |||
c09fe29d99 | |||
a787836e56 | |||
287c2fa99f | |||
111b70aefb | |||
be91e22447 | |||
a337663830 | |||
2cbb14c515 | |||
68cc85b684 |
15
dist/smartfile.memory.js
vendored
15
dist/smartfile.memory.js
vendored
File diff suppressed because one or more lines are too long
20
package.json
20
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "smartfile",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.4",
|
||||
"description": "offers smart ways to work with files in nodejs",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
@ -25,20 +25,20 @@
|
||||
},
|
||||
"homepage": "https://github.com/pushrocks/smartfile",
|
||||
"dependencies": {
|
||||
"beautylog": "4.1.0",
|
||||
"fs-extra": "0.26.7",
|
||||
"beautylog": "^4.1.2",
|
||||
"fs-extra": "^0.26.7",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-remote-src": "^0.4.1",
|
||||
"js-yaml": "3.5.5",
|
||||
"q": "1.4.1",
|
||||
"request": "^2.69.0",
|
||||
"js-yaml": "^3.5.5",
|
||||
"q": "^1.4.1",
|
||||
"request": "^2.70.0",
|
||||
"require-reload": "0.2.2",
|
||||
"vinyl": "1.1.1",
|
||||
"vinyl-file": "2.0.0"
|
||||
"vinyl": "^1.1.1",
|
||||
"vinyl-file": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-function": "^1.2.3",
|
||||
"npmts": "5.0.0",
|
||||
"gulp-function": "^1.3.1",
|
||||
"npmts": "^5.0.4",
|
||||
"should": "^8.3.0"
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
* converts file to Object
|
||||
* @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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user