Skip to content

Commit

Permalink
improve js docs - path examples
Browse files Browse the repository at this point in the history
  • Loading branch information
yeasir01 committed Jan 29, 2024
1 parent d76c42b commit 509878d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions src/BrotherSdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,14 @@ export default class BrotherSdk {
* @param {Object} object
* @param {String} object.templatePath
* Specifies the path to the template file (supports various formats)
* - Local path: "c:/path/to/your/template.lbx"
* - UNC path: "\\server\share\template.lbx"
* - Win path: "C:\\\path\\\to\\\your\\\template.lbx"
* - Unix path: "/home/templates/template.lbx"
* - UNC path: "\\\server\share\template.lbx"
* - Remote URL: "http://yourserver.com/templates/label.lbx"
* @param {String} [object.exportDir = ""]
* The path for exporting generated templates.
* - Win path: "C:\\\path\\\to\\\your\\\"
* - Unix path: "/home/templates/"
*/
constructor({
templatePath,
Expand Down Expand Up @@ -287,12 +290,12 @@ export default class BrotherSdk {
const status = await exportTemplate(fileType, path, resolution);
await closeTemplate();

if (status) {
return true;
if (!status) {
throw new Error(
"Export failed: Please check the export directory and filename.",
);
}

throw new Error(
"Export failed: Please check the export directory and filename.",
);
return true;
}
}
2 changes: 1 addition & 1 deletion tests/browser/playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const data = {
/* {autoCut: true, mirroring: true, specialTape:true} */
const printTag = async () => {
try {
const complete = await tag.print(data, { mirroring: true, autoCut: true });
const complete = await tag.print(data, { highResolution: true, autoCut:true });
console.log({ complete });
} catch (error) {
console.log({ error });
Expand Down

0 comments on commit 509878d

Please sign in to comment.