Skip to content

Commit

Permalink
v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aMarCruz committed Feb 18, 2021
0 parents commit 3fe20e9
Show file tree
Hide file tree
Showing 46 changed files with 12,984 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"root": true,
"extends": ["@quitsmx"],
"ignorePatterns": ["dist"],
"overrides": [
{
"files": ["**/*.js"],
"extends": "@quitsmx/eslint-config/node"
}
]
}
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# See https://help.github.com/articles/ignoring-files/
.DS_Store
.eslintcache
.pnp
.pnp.js
*.bak
*.local
*.log
*.tgz
*.tmp
*~
/build
/coverage
/dist
/release
~*
node_modules
npm-debug.log*
package-lock.json
**/*.tsbuildinfo
6 changes: 6 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"default": true,
"line-length": false,
"no-duplicate-header": { "siblings_only": true },
"no-inline-html": false
}
11 changes: 11 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"offsetTernaryExpressions": true,
"arrowParens": "avoid",
"generatorStarSpacing": true,
"printWidth": 92,
"quoteProps": "consistent",
"semi": false,
"singleQuote": true,
"spaceBeforeFunctionParen": false,
"yieldStarSpacing": true
}
26 changes: 26 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"javascript.format.enable": false,
"typescript.format.enable": false,
"eslint.format.enable": true,
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true
},
"[javascriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true
},
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true
},
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true
},
"files.associations": {
".prettierignore": "ignore",
"**/src/**/*.json": "jsonc",
"{icons,babel.config}.json": "jsonc"
},
}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# make-sprites Changes

## \[0.1.0] - 2021-02-17

First public release (WIP)
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 QuITS

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# MakeSprites

WIP

Sprites from...

- [FontAwesome](https://fontawesome.com/icons?d=gallery&s=brands,regular,solid&m=free)
- [Web Icons](https://getbootstrapadmin.com/remark/base/uikit/icons/web-icons.html)
2,292 changes: 2,292 additions & 0 deletions data/fab-defs.json

Large diffs are not rendered by default.

762 changes: 762 additions & 0 deletions data/far-defs.json

Large diffs are not rendered by default.

5,012 changes: 5,012 additions & 0 deletions data/fas-defs.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// do not delete
11 changes: 11 additions & 0 deletions data/svg.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Sprites generados automáticamente con datos de project://icons.json
CUIDADO: No edites este XML manualmente.
-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" style="display:none;">
{{symbols}}
</svg>
50 changes: 50 additions & 0 deletions data/ts.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/* eslint prettierx/options:[2,{alignObjectProperties:true,trailingComma:'all'}] */
/**
* Definiciones de `id` de símbolos SVG para usarse con _sprites_ de iconos.
*
* 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.
* ---------------------------------------------------------------------
*/

/**
* Copia las propiedades de `obj` en un objeto simple 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.
*
* 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).
*/
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.
*/
export const iconRatios = {{ratios}}
Loading

0 comments on commit 3fe20e9

Please sign in to comment.