{"id":13506742,"url":"https://github.com/kdydesign/nuxt-fontagon","last_synced_at":"2025-05-07T20:35:13.146Z","repository":{"id":55014678,"uuid":"278268428","full_name":"kdydesign/nuxt-fontagon","owner":"kdydesign","description":"Try converting svg into font easily to make icon-font automatically. The Icon-Font generator Fontagon is available on the Nuxt module.","archived":false,"fork":false,"pushed_at":"2021-06-28T16:13:49.000Z","size":340,"stargazers_count":19,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-01T05:32:49.214Z","etag":null,"topics":["icon","icon-fonts","iconfont-build","iconfonts","nuxt","nuxt-modules","nuxtjs","webfont-generator","webfonts"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kdydesign.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-09T05:07:38.000Z","updated_at":"2023-08-17T04:34:50.000Z","dependencies_parsed_at":"2022-08-14T09:10:16.259Z","dependency_job_id":null,"html_url":"https://github.com/kdydesign/nuxt-fontagon","commit_stats":null,"previous_names":["kdydesign/nuxt-iconfont-generator"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdydesign%2Fnuxt-fontagon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdydesign%2Fnuxt-fontagon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdydesign%2Fnuxt-fontagon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdydesign%2Fnuxt-fontagon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kdydesign","download_url":"https://codeload.github.com/kdydesign/nuxt-fontagon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224168538,"owners_count":17267271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["icon","icon-fonts","iconfont-build","iconfonts","nuxt","nuxt-modules","nuxtjs","webfont-generator","webfonts"],"created_at":"2024-08-01T01:00:56.583Z","updated_at":"2024-11-17T23:06:31.378Z","avatar_url":"https://github.com/kdydesign.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized","JavaScript"],"sub_categories":["Uncategorized"],"readme":"# 🐾 Nuxt-Fontagon\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![Circle CI][circle-ci-src]][circle-ci-href]\n[![Codecov][codecov-src]][codecov-href]\n[![Standard JS][standard-js-src]][standard-js-href]\n![License][license-src]\n\n\u003e Easy convert SVG from nuxt to icon font.\n\u003e Try converting svg into font easily to make icon-font automatically. \n\u003e The Icon-Font generator [**Fontagon**](https://github.com/kdydesign/fontagon) is available on the Nuxt module.\n\n## Info\n\n\u003e 🔔 This package has been renamed from `nuxt-iconfont-generator` to `nuxt-fontagon`\n\n- [📖 **Release Notes**](./CHANGELOG.md)\n- [💻 **CodeSandbox**](https://codesandbox.io/s/nuxt-fontagon-example-0gqg0?fontsize=14\u0026hidenavigation=1\u0026theme=dark)\n\n## Features\n\n√ Automatically convert svg to font file when building\u003cbr\u003e\n√ Based on the svg file name, create the `CSS` and `Stylus`, `SASS`, and `LESS` files as you want\n\n🔔 `nuxt-fontagon` uses Fontagon functionality as it is. See the [**Fontagon documentation**](https://github.com/kdydesign/fontagon/tree/master/packages/fontagon)\n\n## Install\n\n1. Add `nuxt-fontagon` dependency to your project\n\n```bash\n# Using npm\nnpm install --save-dev nuxt-fontagon\n# Using yarn\nyarn add --dev nuxt-fontagon\n```\n\n2. Add `nuxt-fontagon` to the `buildModules` section of `nuxt.config.js`\n\n```js\nmodule.exports = {\n  buildModules: [\n    'nuxt-fontagon'\n  ],\n  iconFont: {\n    /* Fontagon options */\n  }\n}\n```\n\n⚠️ If you are using `nuxt \u003c 2.9.0`, use `modules` property instead and install it as a dependency (no `--dev` or `--save-dev` flags).\n\n## Options\n\n### `files`\n\nList of SVG files.\n\n🔔 *The files option `srcDir` in Nuxt is root path.*\n\n* Type: `Array`\n* Default: `[srcDir/assets/**/*.svg]`\n* *required*\n\n\u003cbr\u003e\n\n### `dist`\n\nDirectory for generated font files.\n\n🔔 *The dist option `srcDir` in Nuxt is root path.*\n\n* Type: `String`\n* Default: `'srcDir/assets/font'`\n\n\u003cbr\u003e\n\n### `fontName`\n\nSpecify a font name and the default name for the font file.\n\n* Type: `String`\n* Default: `'fontagon-icons'`\n\n\u003cbr\u003e\n\n### `style`\n\nstylesheet file generation type.\n\n* Type: `String`\n* Default: `'all'`\n* options: `'css', 'sass', 'less', 'stylus'`\n\n\u003cbr\u003e\n\n### `styleTemplate`\n\nSpecify a custom style template.\n\n\nThe **'.hbs'** extension is required because the custom template is compiled through [handlebars](https://handlebarsjs.com/).\n\n\nIf the `style` is **'all'**, only one pre-processor template is specified in the `styleTemplate`, \nit is merged with the default option and processed.\n\n* Type: `Object`\n* Default: \n```json\n{\n  \"styleTemplate\": {\n      \"css\": \"css.hbs\",\n      \"sass\": \"sass.hbs\",\n      \"less\": \"less.hbs\",\n      \"stylus\": \"styl.hbs\"\n  }\n}\n```\n\n\u003cbr\u003e\n\n### `classOptions`\n\nAdditional options for CSS templates, that extends default options.\n\n\nWhen **'baseClass'** is set, it is specified by the default class name of the stylesheet, \nor **'classPrefix'** as a sub class factor of the stylesheet.\n\n* Type: `Object`\n* Default: \n```json\n{\n    \"baseClass\": \"fontagon-icons\",\n    \"classPrefix\": \"ft\"\n  }\n```\n\n\u003cbr\u003e\n\n### `order`\n\nOrder of `src` values in `font-face` in CSS file.\n\n* Type: `Array`\n* Default: `['eot', 'woff2', 'woff', 'ttf', 'svg']`\n\n\u003cbr\u003e\n\n### `rename`\n\nFunction that takes path of file and return name of icon.\n\n* Type: `Function`\n* Default: basename of file\n\n\u003cbr\u003e\n\n### `startCodepoint`\n\nStarting codepoint. Defaults to beginning of unicode private area.\n\n* Type: `Number`\n* Default: `0xF101`\n\n\u003cbr\u003e\n\n### `codepoints`\n\nSpecific codepoints for certain icons.\n\u003cbr\u003e\nIcons without codepoints will have codepoints incremented from `startCodepoint` skipping duplicates.\n\n* Type: `Object`\n* Default: `{}`\n\n\u003cbr\u003e\n\n### `formatOptions`\nSpecific per format arbitrary options to pass to the generator\n\n* Type: `object`\n* Default:\n```json\n{\n  \"svg\": {\n    \"normalize\": true,\n    \"fontHeight\": 1000\n  }\n}\n```\n\nformat and matching generator:\n- `svg` - [svgicons2svgfont](https://github.com/nfroidure/svgicons2svgfont).\n- `ttf` - [svg2ttf](https://github.com/fontello/svg2ttf).\n- `woff2` - [ttf2woff2](https://github.com/nfroidure/ttf2woff2).\n- `woff` - [ttf2woff](https://github.com/fontello/ttf2woff).\n- `eot` - [ttf2eot](https://github.com/fontello/ttf2eot).\n\n\u003cbr\u003e\n\n### `writeFiles`\n\nIt is possible to not create files and get generated fonts in object to write them to files later.\n\u003cbr\u003e\nAlso results object will have function `generateCss([urls])` where `urls` is an object with future fonts urls.\n\n* Type: `Boolean`\n* Default: `true`\n\n\n## License\n\n[MIT License](./LICENSE)\n\nCopyright (c) [Dev.DY](https://kdydesign.github.io/)\n\n\u003c!-- Badges --\u003e\n[npm-version-src]: https://img.shields.io/npm/v/nuxt-fontagon?style=flat-square\n[npm-version-href]: https://npmjs.com/package/nuxt-fontagon\n[npm-downloads-src]: https://img.shields.io/npm/dt/nuxt-fontagon?style=flat-square\n[npm-downloads-href]: https://npmjs.com/package/nuxt-fontagon\n[circle-ci-src]: https://img.shields.io/circleci/project/github/kdydesign/nuxt-fontagon/master.svg?style=flat-square\n[circle-ci-href]: https://circleci.com/gh/kdydesign/nuxt-fontagon/tree/master\n[codecov-src]: https://img.shields.io/codecov/c/github/kdydesign/nuxt-fontagon.svg?style=flat-square\n[codecov-href]: https://codecov.io/gh/kdydesign/nuxt-fontagon\n[david-dm-src]: https://david-dm.org/kdydesign/nuxt-fontagon/status.svg?style=flat-square\n[david-dm-href]: https://david-dm.org/kdydesign/nuxt-fontagon\n[standard-js-src]: https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square\n[standard-js-href]: https://standardjs.com\n[license-src]: https://img.shields.io/npm/l/nuxt-fontagon?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkdydesign%2Fnuxt-fontagon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkdydesign%2Fnuxt-fontagon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkdydesign%2Fnuxt-fontagon/lists"}