Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastián Gurín committed Aug 17, 2019
1 parent 0133e5d commit 06c5192
Show file tree
Hide file tree
Showing 57 changed files with 1,211 additions and 366 deletions.
80 changes: 40 additions & 40 deletions docs/classes/_file_file_.file.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ interacting with HTML DOM, etc.

\+ **new File**(`name`: string, `content`: `ArrayBufferView`, `isProtected`: boolean, `url?`: undefined | string, `width?`: undefined | number, `height?`: undefined | number): *[File](_file_file_.file.md)*

*Defined in [file/file.ts:36](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L36)*
*Defined in [file/file.ts:36](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L36)*

**Parameters:**

Expand All @@ -95,15 +95,15 @@ Name | Type | Default |

**_info**: *[ExtractInfoResultImage](../interfaces/_image_imageinfo_.extractinforesultimage.md)[] | undefined*

*Defined in [file/file.ts:35](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L35)*
*Defined in [file/file.ts:35](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L35)*

___

### `Protected` `Optional` _pixels

**_pixels**? : *[Rgba](../interfaces/_types_.rgba.md)[]*

*Defined in [file/file.ts:36](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L36)*
*Defined in [file/file.ts:36](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L36)*

___

Expand All @@ -113,15 +113,15 @@ ___

*Implementation of [IFile](../interfaces/_types_.ifile.md).[content](../interfaces/_types_.ifile.md#content)*

*Defined in [file/file.ts:38](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L38)*
*Defined in [file/file.ts:38](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L38)*

___

### `Optional` height

**height**? : *undefined | number*

*Defined in [file/file.ts:34](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L34)*
*Defined in [file/file.ts:34](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L34)*

Stores size for those image formats that don't store size information such as RGBA

Expand All @@ -133,23 +133,23 @@ ___

*Implementation of [IFile](../interfaces/_types_.ifile.md).[name](../interfaces/_types_.ifile.md#name)*

*Defined in [file/file.ts:38](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L38)*
*Defined in [file/file.ts:38](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L38)*

___

### `Optional` url

**url**? : *undefined | string*

*Defined in [file/file.ts:26](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L26)*
*Defined in [file/file.ts:26](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L26)*

___

### `Optional` width

**width**? : *undefined | number*

*Defined in [file/file.ts:30](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L30)*
*Defined in [file/file.ts:30](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L30)*

Stores size for those image formats that don't store size information such as RGBA

Expand All @@ -159,7 +159,7 @@ Stores size for those image formats that don't store size information such as RG

**asBase64**(`file`: [File](_file_file_.file.md)): *string*

*Defined in [file/file.ts:128](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L128)*
*Defined in [file/file.ts:128](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L128)*

Returns base64 representation of this image in an encoded format like PNG

Expand All @@ -177,7 +177,7 @@ ___

**asDataUrl**(`mime?`: undefined | string): *`Promise<string>`*

*Defined in [file/file.ts:121](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L121)*
*Defined in [file/file.ts:121](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L121)*

Creates a DataUrl like `data:image/png;name=f.png;base64,` using given base64 content, mimeType and fileName.

Expand All @@ -195,7 +195,7 @@ ___

**asHTMLImageData**(): *`Promise<ImageData>`*

*Defined in [file/file.ts:141](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L141)*
*Defined in [file/file.ts:141](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L141)*

**Returns:** *`Promise<ImageData>`*

Expand All @@ -205,7 +205,7 @@ ___

**asRGBAImageData**(): *`Promise<RGBAImageData>`*

*Defined in [file/file.ts:146](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L146)*
*Defined in [file/file.ts:146](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L146)*

**Returns:** *`Promise<RGBAImageData>`*

Expand All @@ -215,7 +215,7 @@ ___

**equals**(`file?`: [File](_file_file_.file.md)): *`Promise<boolean>`*

*Defined in [file/file.ts:135](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L135)*
*Defined in [file/file.ts:135](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L135)*

Returns base64 representation of this image in an encoded format like PNG

Expand All @@ -233,7 +233,7 @@ ___

**info**(): *`Promise<ExtractInfoResultImage[]>`*

*Defined in [file/file.ts:63](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L63)*
*Defined in [file/file.ts:63](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L63)*

Get image information, like geometry, important numbers, mimeType, etc.
The first time it calls `identify` command, but then it will cache ths value.
Expand All @@ -246,7 +246,7 @@ ___

**infoOne**(): *`Promise<ExtractInfoResultImage>`*

*Defined in [file/file.ts:51](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L51)*
*Defined in [file/file.ts:51](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L51)*

Same as [info] but returning only the first image's data.

Expand All @@ -258,7 +258,7 @@ ___

**mimeType**(): *`Promise<string>`*

*Defined in [file/file.ts:94](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L94)*
*Defined in [file/file.ts:94](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L94)*

**Returns:** *`Promise<string>`*

Expand All @@ -268,7 +268,7 @@ ___

**pixel**(`x`: number, `y`: number): *`Promise<string | undefined>`*

*Defined in [file/file.ts:99](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L99)*
*Defined in [file/file.ts:99](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L99)*

**Parameters:**

Expand All @@ -285,7 +285,7 @@ ___

**pixelCalculate**(): *`Promise<void>`*

*Defined in [file/file.ts:114](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L114)*
*Defined in [file/file.ts:114](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L114)*

it will compute all pixel colors so following [pixel] and [rgba] calls will be fast

Expand All @@ -297,7 +297,7 @@ ___

**rgba**(`x`: number, `y`: number): *`Promise<Rgba | undefined>`*

*Defined in [file/file.ts:106](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L106)*
*Defined in [file/file.ts:106](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L106)*

**Parameters:**

Expand All @@ -314,7 +314,7 @@ ___

**size**(): *`Promise<Size>`*

*Defined in [file/file.ts:76](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L76)*
*Defined in [file/file.ts:76](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L76)*

**Returns:** *`Promise<Size>`*

Expand All @@ -324,7 +324,7 @@ ___

**sizeDepthArgs**(`onlyIfRGBA`: boolean): *`Promise<string>`*

*Defined in [file/file.ts:158](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L158)*
*Defined in [file/file.ts:158](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L158)*

**Parameters:**

Expand All @@ -340,7 +340,7 @@ ___

**widthXHeight**(): *`Promise<string>`*

*Defined in [file/file.ts:86](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L86)*
*Defined in [file/file.ts:86](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L86)*

**Returns:** *`Promise<string>`*

Expand All @@ -350,7 +350,7 @@ ___

**asFile**(`f`: string | [IFile](../interfaces/_types_.ifile.md)): *[File](_file_file_.file.md)*

*Defined in [file/file.ts:274](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L274)*
*Defined in [file/file.ts:274](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L274)*

**Parameters:**

Expand All @@ -366,7 +366,7 @@ ___

**asPath**(`f`: string | [IFile](../interfaces/_types_.ifile.md)): *string*

*Defined in [file/file.ts:278](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L278)*
*Defined in [file/file.ts:278](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L278)*

**Parameters:**

Expand All @@ -382,7 +382,7 @@ ___

**asString**(`f`: [IFile](../interfaces/_types_.ifile.md)): *string*

*Defined in [file/file.ts:204](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L204)*
*Defined in [file/file.ts:204](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L204)*

Returns the file content as plain string. This is useful to read the content of a .json or .txt file
but not for images or other binary file content.
Expand All @@ -401,7 +401,7 @@ ___

**equals**(`a`: string | [IFile](../interfaces/_types_.ifile.md), `b`: string | [IFile](../interfaces/_types_.ifile.md)): *boolean*

*Defined in [file/file.ts:139](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L139)*
*Defined in [file/file.ts:139](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L139)*

**Parameters:**

Expand All @@ -418,7 +418,7 @@ ___

**fileExists**(`f`: string | [IFile](../interfaces/_types_.ifile.md)): *`Promise<boolean>`*

*Defined in [file/file.ts:290](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L290)*
*Defined in [file/file.ts:290](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L290)*

**Parameters:**

Expand All @@ -434,7 +434,7 @@ ___

**fromBase64**(`base64`: string, `name`: string): *[File](_file_file_.file.md)*

*Defined in [file/file.ts:218](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L218)*
*Defined in [file/file.ts:218](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L218)*

Loads file from given base64 string.

Expand All @@ -453,7 +453,7 @@ ___

**fromDataUrl**(`dataUrl`: string, `name`: string): *[File](_file_file_.file.md)*

*Defined in [file/file.ts:225](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L225)*
*Defined in [file/file.ts:225](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L225)*

Loads file from given data url string.

Expand All @@ -472,7 +472,7 @@ ___

**fromFile**(`f`: string, `o`: [ResolveOptions](../interfaces/_file_file_.resolveoptions.md)): *`Promise<undefined | File>`*

*Defined in [file/file.ts:188](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L188)*
*Defined in [file/file.ts:188](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L188)*

Creates a File from given file system path. Only Node.js.

Expand All @@ -491,7 +491,7 @@ ___

**fromHTMLImageData**(`d`: `ImageData`, `name`: string): *[File](_file_file_.file.md)*

*Defined in [file/file.ts:286](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L286)*
*Defined in [file/file.ts:286](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L286)*

**Parameters:**

Expand All @@ -508,7 +508,7 @@ ___

**fromHtmlFileInputElement**(`el`: `HTMLInputElement`): *`Promise<Array<File>>`*

*Defined in [file/file.ts:232](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L232)*
*Defined in [file/file.ts:232](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L232)*

Loads files from files in html input element of type "file".

Expand All @@ -526,7 +526,7 @@ ___

**fromRGBAImageData**(`d`: `RGBAImageData`, `name`: string): *[File](_file_file_.file.md)*

*Defined in [file/file.ts:282](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L282)*
*Defined in [file/file.ts:282](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L282)*

**Parameters:**

Expand All @@ -543,7 +543,7 @@ ___

**fromUrl**(`url`: string, `o`: `RequestInit` & [ResolveOptions](../interfaces/_file_file_.resolveoptions.md)): *`Promise<undefined | File>`*

*Defined in [file/file.ts:175](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L175)*
*Defined in [file/file.ts:175](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L175)*

Creates a File from given url. In Node.js urls must be absolute!.

Expand All @@ -562,7 +562,7 @@ ___

**getSizeDepthArgs**(`f`: [File](_file_file_.file.md), `onlyIfRGBA`: boolean): *`Promise<string>`*

*Defined in [file/file.ts:161](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L161)*
*Defined in [file/file.ts:161](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L161)*

**Parameters:**

Expand All @@ -579,7 +579,7 @@ ___

**isFile**(`f`: any): *boolean*

*Defined in [file/file.ts:270](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L270)*
*Defined in [file/file.ts:270](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L270)*

**Parameters:**

Expand All @@ -595,7 +595,7 @@ ___

**resolve**(`files`: string | [IFile](../interfaces/_types_.ifile.md) | undefined | undefined | string | [IFile](../interfaces/_types_.ifile.md)[], `options`: [ResolveOptions](../interfaces/_file_file_.resolveoptions.md)): *`Promise<File[]>`*

*Defined in [file/file.ts:251](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L251)*
*Defined in [file/file.ts:251](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L251)*

Given paths, urls or files it will try to load them all and return a list of File for those succeed.

Expand All @@ -614,7 +614,7 @@ ___

**resolveOne**(`files`: string | [IFile](../interfaces/_types_.ifile.md) | undefined | undefined | string | [IFile](../interfaces/_types_.ifile.md)[], `options`: [ResolveOptions](../interfaces/_file_file_.resolveoptions.md)): *`Promise<undefined | File>`*

*Defined in [file/file.ts:243](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L243)*
*Defined in [file/file.ts:243](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L243)*

Shortcut for [resolve] that returns the first result.

Expand All @@ -633,7 +633,7 @@ ___

**toBase64**(`file`: [File](_file_file_.file.md)): *string*

*Defined in [file/file.ts:211](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L211)*
*Defined in [file/file.ts:211](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L211)*

Returns base64 representation of this image in an encoded format like PNG

Expand All @@ -651,7 +651,7 @@ ___

**toDataUrl**(`file`: [File](_file_file_.file.md), `mime?`: undefined | string): *`Promise<string>`*

*Defined in [file/file.ts:168](https://github.com/cancerberoSgx/magica/blob/30321a6/src/file/file.ts#L168)*
*Defined in [file/file.ts:168](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/file/file.ts#L168)*

Creates a DataUrl like `data:image/png;name=f.png;base64,` using given base64 content, mimeType and fileName.

Expand Down
8 changes: 4 additions & 4 deletions docs/classes/_main_template_fshelper_.lshelper.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@

*Implementation of [TemplateHelper](../interfaces/_main_template_template_.templatehelper.md).[name](../interfaces/_main_template_template_.templatehelper.md#name)*

*Defined in [main/template/fsHelper.ts:14](https://github.com/cancerberoSgx/magica/blob/30321a6/src/main/template/fsHelper.ts#L14)*
*Defined in [main/template/fsHelper.ts:14](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/main/template/fsHelper.ts#L14)*

## Methods

### exec

**exec**(`options`: `Options`): *`Promise<string[]>`*

*Defined in [main/template/fsHelper.ts:15](https://github.com/cancerberoSgx/magica/blob/30321a6/src/main/template/fsHelper.ts#L15)*
*Defined in [main/template/fsHelper.ts:15](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/main/template/fsHelper.ts#L15)*

**Parameters:**

Expand All @@ -56,7 +56,7 @@ ___

**fnCompileTime**(`options`: `Options`): *`Promise<string[]>`*

*Defined in [main/template/fsHelper.ts:26](https://github.com/cancerberoSgx/magica/blob/30321a6/src/main/template/fsHelper.ts#L26)*
*Defined in [main/template/fsHelper.ts:26](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/main/template/fsHelper.ts#L26)*

**Parameters:**

Expand All @@ -72,7 +72,7 @@ ___

**fnRunTime**(`options`: `Options`): *`Promise<string[]>`*

*Defined in [main/template/fsHelper.ts:29](https://github.com/cancerberoSgx/magica/blob/30321a6/src/main/template/fsHelper.ts#L29)*
*Defined in [main/template/fsHelper.ts:29](https://github.com/cancerberoSgx/magica/blob/0133e5d/src/main/template/fsHelper.ts#L29)*

**Parameters:**

Expand Down
Loading

0 comments on commit 06c5192

Please sign in to comment.