Skip to content

Commit

Permalink
chore: add example. #211
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Sep 6, 2023
1 parent d411266 commit e5958f2
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ export default async (options: SvgToFontOptions = {}) => {

const fontSizeOpt = typeof options.css !== 'boolean' && options.css.fontSize;
const fontSize = typeof fontSizeOpt === 'boolean' ? (fontSizeOpt === true ? 'font-size: 16px;' : '') : `font-size: ${fontSizeOpt};`;
console.log('options:fontSize:', fontSize)
// If you generate a font you need to generate a style.
if (options.website && !options.css) options.css = true;

Expand Down
1 change: 1 addition & 0 deletions test/example#211/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
font
7 changes: 7 additions & 0 deletions test/example#211/.svgtofontrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import path from "path";
/**
* @type {import('svgtofont').SvgToFontOptions}
*/
export default {
fontName: "iconfont",
}
15 changes: 15 additions & 0 deletions test/example#211/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "ex211",
"version": "4.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "svgtofont --sources ./svg --output ./font"
},
"keywords": [],
"author": "jaywcjlove",
"license": "ISC",
"devDependencies": {
"svgtofont": "^4.0.0"
}
}
5 changes: 5 additions & 0 deletions test/example#211/svg/adobe.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions test/example#211/svg/git.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions test/example#211/svg/stylelint.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e5958f2

Please sign in to comment.