Skip to content

Commit

Permalink
v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
aMarCruz committed Feb 19, 2021
1 parent 3fe20e9 commit 659ba24
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"quoteProps": "consistent",
"semi": false,
"singleQuote": true,
"spaceBeforeFunctionParen": false,
"spaceBeforeFunctionParen": true,
"yieldStarSpacing": true
}
21 changes: 6 additions & 15 deletions data/ts.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,38 @@
*
* Generado automáticamente por makeSprites con datos de project://icons.json
*
* @see https://fontawesome.com/how-to-use/on-the-web/using-with/react
*
* Se proporcionan `const enum` para cada uno de los grupos y un objeto `IC`
* con todos. Puedes usar cualquiera, el componente `Icon` valida con `IC`.
*
* NOTE:
* No edites este archivo manualmente, en su lugar agrega o quita iconos
* en el "icons.json" de la raíz y ejecuta `yarn mk:icons` de nuevo.
* del archivo "icons.json" en la raíz del proyecto.
* ---------------------------------------------------------------------
*/

/**
* Copia las propiedades de `obj` en un objeto simple sin perder su tipo.
* Copia las propiedades de `obj` en otro objeto sin perder su tipo.
*/
const _wrap = <T extends Record<string, unknown>>(obj: T): T =>
Object.assign(Object.create(null) as unknown, obj)

/**
* `IC` contiene todos los ids y lo usará el componente `Icon` para
* validar la existencia de un símbolo en runtime.
* `IC` lo usará el componente `Icon` para validar los símbolos en runtime.
*
* Se puede (y debería) usar también para la propiedad `Icon.icon`.
* @example
*```js
* const elem = <Icon icon={IC.farClock} size="2x" />
*```
*
* NOTE: Los iconos de los grupos "far" y "wb" tienen prefijos que permiten
* el uso de iconos con el mismo nombre pero diferente estilo.
*/
export const IC = _wrap({
{{mapKeys}}
} as const)

/**
* SVG con los sprites, relativo a la raíz del sitio ("public" en dev).
* Rura del SVG de sprites, relativo a la raíz del repositorio.
*/
export const spriteSvgName = '{{svgName}}'

/**
* Lo usa Icon.tsx para establecer en runtime las clases para el ancho
* y el conjunto al que pertenece cada icono.
* Usado por Icon.tsx para establecer en runtime las clases para el ancho
* y el conjunto al que pertenece cada icono. Los omitidos son ratio `16`.
*/
export const iconRatios = {{ratios}}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@quitsmx/make-sprites",
"version": "0.1.0",
"version": "0.1.1",
"description": "Make a sprites file from selected icons",
"main": "./index.js",
"author": "quits <[email protected]>",
Expand Down Expand Up @@ -42,8 +42,8 @@
},
"devDependencies": {
"@fortawesome/fontawesome-free": "~5.15.2",
"@quitsmx/eslint-config": "~0.3.0",
"@types/node": "~14.14.28",
"@quitsmx/eslint-config": "~0.3.1",
"@types/node": "~14.14.30",
"@types/prettier": "~2.2.1",
"eslint": "~7.20.0",
"prettier": "github:aMarCruz/prettier#2.2.1",
Expand Down
34 changes: 17 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,13 @@
"@nodelib/fs.scandir" "2.1.4"
fastq "^1.6.0"

"@quitsmx/eslint-config@~0.3.0":
version "0.3.0"
resolved "https://registry.yarnpkg.com/@quitsmx/eslint-config/-/eslint-config-0.3.0.tgz#5a837a9f91f7352df3f34e8d95e9968d5d13a8a1"
integrity sha512-7NEDV5EWIB59OHpd7P69r6KUiktBHkKhrpXe20AAxLZprTLLZhHOEc+4/Nb32QDwAjVI0v9kZyOCRbY2+WuC5A==
"@quitsmx/eslint-config@~0.3.1":
version "0.3.1"
resolved "https://registry.yarnpkg.com/@quitsmx/eslint-config/-/eslint-config-0.3.1.tgz#ab71e55200df70dff9cbbd84d89f7c53f1f694d3"
integrity sha512-Hf2lYf6nD1Y8n0N87Bb2aaJ1C2jUYMlkkBQ1DbMH39uXVkP4V+3LhalEmnHJw8lIhAvR72eXr9cmuOAG7QGzDQ==
dependencies:
"@typescript-eslint/eslint-plugin" "~4.15.0"
"@typescript-eslint/parser" "~4.15.0"
"@typescript-eslint/eslint-plugin" "~4.15.1"
"@typescript-eslint/parser" "~4.15.1"
confusing-browser-globals "*"
eslint-plugin-compat "~3.9.0"
eslint-plugin-jsx-a11y "~6.4.1"
Expand All @@ -227,7 +227,7 @@
eslint-plugin-react-hooks "~4.2.0"
eslint-plugin-react-perf "~3.3.0"
eslint-plugin-simple-import-sort "~7.0.0"
eslint-plugin-unicorn "~28.0.0"
eslint-plugin-unicorn "~28.0.2"

"@simple-dom/interface@^1.4.0":
version "1.4.0"
Expand All @@ -239,10 +239,10 @@
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad"
integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==

"@types/node@~14.14.28":
version "14.14.28"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.28.tgz#cade4b64f8438f588951a6b35843ce536853f25b"
integrity sha512-lg55ArB+ZiHHbBBttLpzD07akz0QPrZgUODNakeC09i62dnrywr9mFErHuaPlB6I7z+sEbK+IYmplahvplCj2g==
"@types/node@~14.14.30":
version "14.14.30"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.30.tgz#7d5162eec085ba34f8cb9011e9ba12119f76f961"
integrity sha512-gUWhy8s45fQp4PqqKecsnOkdW0kt1IaKjgOIR3HPokkzTmQj9ji2wWFID5THu1MKrtO+d4s2lVrlEhXUsPXSvg==

"@types/normalize-package-data@^2.4.0":
version "2.4.0"
Expand All @@ -264,7 +264,7 @@
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.3.tgz#9c088679876f374eb5983f150d4787aa6fb32d7e"
integrity sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ==

"@typescript-eslint/eslint-plugin@~4.15.0":
"@typescript-eslint/eslint-plugin@~4.15.1":
version "4.15.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.15.1.tgz#835f64aa0a403e5e9e64c10ceaf8d05c3f015180"
integrity sha512-yW2epMYZSpNJXZy22Biu+fLdTG8Mn6b22kR3TqblVk50HGNV8Zya15WAXuQCr8tKw4Qf1BL4QtI6kv6PCkLoJw==
Expand All @@ -290,7 +290,7 @@
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"

"@typescript-eslint/parser@~4.15.0":
"@typescript-eslint/parser@~4.15.1":
version "4.15.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.15.1.tgz#4c91a0602733db63507e1dbf13187d6c71a153c4"
integrity sha512-V8eXYxNJ9QmXi5ETDguB7O9diAXlIyS+e3xzLoP/oVE4WCAjssxLIa0mqCLsCGXulYJUfT+GV70Jv1vHsdKwtA==
Expand Down Expand Up @@ -954,10 +954,10 @@ eslint-plugin-simple-import-sort@~7.0.0:
resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-7.0.0.tgz#a1dad262f46d2184a90095a60c66fef74727f0f8"
integrity sha512-U3vEDB5zhYPNfxT5TYR7u01dboFZp+HNpnGhkDB2g/2E4wZ/g1Q9Ton8UwCLfRV9yAKyYqDh62oHOamvkFxsvw==

eslint-plugin-unicorn@~28.0.0:
version "28.0.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-28.0.1.tgz#a412c2f5ef707444e0147e2994b10ab35f4d812d"
integrity sha512-VuohWRKJuVhuClqZcq+DREAFNDEUDqU7E95SY6Ql3BmH8je5yVqZ6AE7dHQWEa6mDm3aUmo/eT3fXg1jCk17ZA==
eslint-plugin-unicorn@~28.0.2:
version "28.0.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-28.0.2.tgz#ab9884ebae04590ecd9c1c294330d889a74b7c37"
integrity sha512-k4AoFP7n8/oq6lBXkdc9Flid6vw2B8j7aXFCxgzJCyKvmaKrCUFb1TFPhG9eSJQFZowqmymMPRtl8oo9NKLUbw==
dependencies:
ci-info "^2.0.0"
clean-regexp "^1.0.0"
Expand Down

0 comments on commit 659ba24

Please sign in to comment.