Skip to content

Commit

Permalink
test: update example. (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed May 16, 2023
1 parent c1cae38 commit af8d274
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@
},
"devDependencies": {
"@types/csso": "^5.0.0",
"tsbb": "^4.0.3"
"tsbb": "^4.1.5"
}
}
15 changes: 8 additions & 7 deletions test/templates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ const svgtofont = require("../../lib");
const pkg = require('../../package.json');

const rootPath = path.resolve(process.cwd(), "test", "templates");

svgtofont({
/**
* @type {import('../../lib').SvgToFontOptions}
*/
const options = {
src: path.resolve(rootPath, "svg"), // svg path
dist: path.resolve(rootPath, "dist"), // output path
// emptyDist: true, // Clear output directory contents
Expand All @@ -18,6 +20,7 @@ svgtofont({
fontHeight: 1000,
normalize: true
},
useCSSVars: true,
// website = null, no demo html files
website: {
// Add a Github corner to your website
Expand Down Expand Up @@ -61,12 +64,10 @@ svgtofont({
url: "index.html"
}
],
options: {
useCSSVars: true,
},
footerInfo: `Licensed under MIT. (Yes it's free and <a target="_blank" href="https://github.com/jaywcjlove/svgtofont">open-sourced</a>)`
}
})
.then(() => {
}

svgtofont(options).then(() => {
console.log("done!");
});

0 comments on commit af8d274

Please sign in to comment.