mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 21:25:26 +00:00
VScode syntax auto-improvements
This commit is contained in:
@@ -148,7 +148,7 @@ export async function getModelFolderContents(model: string): Promise<Partitioned
|
|||||||
}
|
}
|
||||||
|
|
||||||
const fileComponents = file.split(path.sep);
|
const fileComponents = file.split(path.sep);
|
||||||
const fileName = fileComponents[fileComponents.length-1];
|
const fileName = fileComponents[fileComponents.length - 1];
|
||||||
|
|
||||||
return { ...acc, [fileName]: buffers[index] };
|
return { ...acc, [fileName]: buffers[index] };
|
||||||
}, {})
|
}, {})
|
||||||
@@ -177,7 +177,7 @@ export async function getModelFolderContents(model: string): Promise<Partitioned
|
|||||||
const pathContents = (err.path as string).split(/(\/|\\\?)/);
|
const pathContents = (err.path as string).split(/(\/|\\\?)/);
|
||||||
throw new Error(formatMessage(
|
throw new Error(formatMessage(
|
||||||
"MODELF_FILE_NOT_FOUND",
|
"MODELF_FILE_NOT_FOUND",
|
||||||
pathContents[pathContents.length-1]
|
pathContents[pathContents.length - 1]
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -217,7 +217,7 @@ export function getModelBufferContents(model: BundleUnit): PartitionedBundle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// separing localization folders from bundle files
|
// separing localization folders from bundle files
|
||||||
const [ l10nBundle, bundle ] = splitBufferBundle(rawBundle);
|
const [l10nBundle, bundle] = splitBufferBundle(rawBundle);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
bundle,
|
bundle,
|
||||||
@@ -259,7 +259,7 @@ export async function readCertificatesFromOptions(options: Certificates): Promis
|
|||||||
|
|
||||||
if (!!path.parse(content).ext) {
|
if (!!path.parse(content).ext) {
|
||||||
// The content is a path to the document
|
// The content is a path to the document
|
||||||
return readFile(path.resolve(content), { encoding: "utf8"});
|
return readFile(path.resolve(content), { encoding: "utf8" });
|
||||||
} else {
|
} else {
|
||||||
// Content is the real document content
|
// Content is the real document content
|
||||||
return Promise.resolve(content);
|
return Promise.resolve(content);
|
||||||
|
|||||||
Reference in New Issue
Block a user