Home Manual Reference Source Test
import {CombineFilesCache} from 'atscm/src/lib/transform/SplittingTransformer.js'
public class | source

CombineFilesCache

Determines which files are needed to create a combined file and stores these files as long as some of them are missing.

Test:

Constructor Summary

Public Constructor
public

Creates a new DisplayCache.

Member Summary

Private Members
private

The files caches for the given path.

private

The extensions of the files required.

Method Summary

Public Methods
public

gotAllFiles(file: vinyl~File, callback: function(err: ?Error, files: Map<String, vinyl~File>))

Checks if, when file is added, all required files are cached.

public

Returns the extensions of the missing files for the given dirname.

Public Constructors

public constructor() source

Creates a new DisplayCache.

Private Members

private _files: Map<String, vinyl~File> source

The files caches for the given path.

private _required: String[] source

The extensions of the files required.

Public Methods

public gotAllFiles(file: vinyl~File, callback: function(err: ?Error, files: Map<String, vinyl~File>)) source

Checks if, when file is added, all required files are cached.

Params:

NameTypeAttributeDescription
file vinyl~File

The file to add before checking.

callback function(err: ?Error, files: Map<String, vinyl~File>)

Called with the error that occured while checking or all files related to file if all required files are already cached.

Test:

public missingExtensions(dirname: string): String[] source

Returns the extensions of the missing files for the given dirname.

Params:

NameTypeAttributeDescription
dirname string

The cache key to look for.

Return:

String[]

Extensions of the missing files.

Test: