Skip to content

Commit

Permalink
adding a few new icons
Browse files Browse the repository at this point in the history
  • Loading branch information
jsmith committed Aug 28, 2021
1 parent 6348ad6 commit 66f34dd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"cSpell.words": [
"Qrcode",
"Wifi",
"graywolfai",
"heroicons"
"heroicons",
"refactoringui",
"stylable",
"zaydek"
],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ export const SomeComponent = () => {
↳ ArrowRightSolid
↳ ArrowsExpandOutline
↳ ArrowsExpandSolid
↳ ArrowSmDownOutline
↳ ArrowSmDownSolid
↳ ArrowSmLeftOutline
↳ ArrowSmLeftSolid
↳ ArrowSmRightOutline
↳ ArrowSmRightSolid
↳ ArrowSmUpOutline
↳ ArrowSmUpSolid
↳ ArrowUpOutline
↳ ArrowUpSolid
↳ AtSymbolOutline
Expand Down
10 changes: 5 additions & 5 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ const imports = [];

const processRepo = () => {
try {
["outline", "solid"].forEach((name) => {
const srcFolder = path.join(folder, "optimized", name);
const outFolder = path.join(iconsFolder, name);
["outline", "solid"].forEach((svgType) => {
const srcFolder = path.join(folder, "optimized", svgType);
const outFolder = path.join(iconsFolder, svgType);
execSync(`rm -rf ${outFolder}`);

if (!fs.existsSync(outFolder)) {
Expand All @@ -38,7 +38,7 @@ const processRepo = () => {
const src = path.join(srcFolder, svg);

let everythingButExtension = svg.substr(0, svg.lastIndexOf("."));
let outName = everythingButExtension + "-" + name; // name is "outline" or "solid"
let outName = everythingButExtension + "-" + svgType;
const outFileName = `${outName}.tsx`;
const out = path.join(outFolder, outFileName);
const pascalName = toPascalCase(outName);
Expand All @@ -61,7 +61,7 @@ const processRepo = () => {
' stroke="currentColor"'
);

imports.push([path.join(name, outFileName), pascalName]);
imports.push([path.join(svgType, outFileName), pascalName]);

let processed = contents.trim().split("\n").join("\n ");
processed = `<svg {...props} ref={ref} ${processed.substr(4)}`;
Expand Down

0 comments on commit 66f34dd

Please sign in to comment.