mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 18:25:24 +00:00
Added function comments to factory model analysis functions
This commit is contained in:
@@ -90,7 +90,13 @@ async function getModelContents(model: FactoryOptions["model"]) {
|
|||||||
return modelContents;
|
return modelContents;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getModelFolderContents(model: string) {
|
/**
|
||||||
|
* Reads and model contents and creates a splitted
|
||||||
|
* bundles-object.
|
||||||
|
* @param model
|
||||||
|
*/
|
||||||
|
|
||||||
|
async function getModelFolderContents(model: string): Promise<PartitionedBundle> {
|
||||||
const modelPath = path.resolve(model) + (!!model && !path.extname(model) ? ".pass" : "");
|
const modelPath = path.resolve(model) + (!!model && !path.extname(model) ? ".pass" : "");
|
||||||
const modelFilesList = await readDir(modelPath);
|
const modelFilesList = await readDir(modelPath);
|
||||||
|
|
||||||
@@ -147,7 +153,13 @@ async function getModelFolderContents(model: string) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function getModelBufferContents(model: BundleUnit) {
|
/**
|
||||||
|
* Analyzes the passed buffer model and splits it to
|
||||||
|
* return buffers and localization files buffers.
|
||||||
|
* @param model
|
||||||
|
*/
|
||||||
|
|
||||||
|
function getModelBufferContents(model: BundleUnit): PartitionedBundle {
|
||||||
const bundle = removeHidden(Object.keys(model)).reduce<BundleUnit>((acc, current) => {
|
const bundle = removeHidden(Object.keys(model)).reduce<BundleUnit>((acc, current) => {
|
||||||
// Checking if current file is one of the autogenerated ones or if its
|
// Checking if current file is one of the autogenerated ones or if its
|
||||||
// content is not available
|
// content is not available
|
||||||
|
|||||||
Reference in New Issue
Block a user