Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The preview file is not created in the .HTML format ! #171

Open
paladio opened this issue Jul 21, 2022 · 7 comments
Open

The preview file is not created in the .HTML format ! #171

paladio opened this issue Jul 21, 2022 · 7 comments

Comments

@paladio
Copy link

paladio commented Jul 21, 2022

I use this command to execute

"svg-icon": "svgtofont --sources \"src/svg-raw\" --output \"src/svg-ico\"",

But the preview file is not created in HTML format, only two html empty files are created in which nothing is displayed

What is the problem? why is the .html preview file not created? Why are the files .html empty?

2022-07-21_202719

@paladio paladio changed the title The preview file is not created in the .HML format The preview file is not created in the .HTML format ! Jul 21, 2022
@jaywcjlove
Copy link
Owner

I'm not quite sure what your configuration is.

You can refer to a simple example here:
https://github.com/jaywcjlove/svgtofont/tree/master/test/example

@paladio

@paladio
Copy link
Author

paladio commented Jul 21, 2022

I'm not quite sure what your configuration is.

You can refer to a simple example here: https://github.com/jaywcjlove/svgtofont/tree/master/test/example

@paladio

Here it is suggested that the file should be generated automatically

" Automatically generate a preview site "

@paladio
Copy link
Author

paladio commented Jul 21, 2022

How to call the config file with npm scripts?
I did not use any special configuration and only used the npm command line scripts

"svg-icon": "svgtofont --sources \"src/svg-raw\" --output \"src/svg-ico\"",

Where should the config file be placed?
How can the config be called?
Why is the html preview file not created?
How to customize the output type and format?
I wish this plugin had a better and more complete document with more examples!

@jaywcjlove
Copy link
Owner

Using With Command

{
  "scripts": {
    "font": "svgtofont --sources ./svg --output ./font --fontName uiw-font"
  },
  "svgtofont": {
    "css": {
      "fontSize": "12px"
    }
  }
}

You can add configuration to package.json. #48

Supports .svgtofontrc Configuration File.

{
  "fontName": "svgtofont",
  "css": true
}

@paladio

@paladio
Copy link
Author

paladio commented Jul 22, 2022

@jaywcjlove

I tested this method but there are still problems !!

Why is the file HTML empty and there is no icon preview in it?
To prevent the less/sass/styl production what should be done and what configuration should be done where?
How to prevent the production of react components?
How to prevent .json file generation?
How can you determine which font formats to produce and which formats not to produce?

@paladio
Copy link
Author

paladio commented Jul 22, 2022

@jaywcjlove
My problem is still not solved and the HTML file is empty and the preview of the icons is not displayed ??!!

@jaywcjlove
Copy link
Owner

You can submit it to a repository and I'll take a look at it for you.
@paladio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants