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

Valkyrie 1.0 #48

Open
wants to merge 366 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
366 commits
Select commit Hold shift + click to select a range
4d3dfbc
Fix layers plus icon
Studio384 Feb 20, 2023
719e9c4
Add tag-plus icon
Studio384 Feb 22, 2023
0f1eacf
Add tag plus to documentaiton
Studio384 Feb 22, 2023
7c8229b
Update dependencies
Studio384 Feb 27, 2023
d3b20f1
Add tag-gear icon
Studio384 Feb 27, 2023
c4ca0b4
Valkyrie 1.0 alpha 13
Studio384 Feb 27, 2023
38a5b36
Add square-p and transate
Studio384 Mar 30, 2023
bb9f80f
Update dependencies
Studio384 Mar 30, 2023
24d23fc
Valkyrie 1.0 alpha 14
Studio384 Mar 30, 2023
408264c
Update dependencies
Studio384 Apr 4, 2023
aa2ee4f
Update Fantasticon, SVGO and SVG-to-TS
Studio384 Apr 4, 2023
adce2e8
Use html-to-react instead of dangerouslySetInnerHTML
Studio384 Apr 5, 2023
01047d1
Valkyrie 1.0 alpha 15
Studio384 Apr 5, 2023
91a1176
Replace HTML parser
Studio384 Apr 12, 2023
336e5b0
Valkyrie 1.0 alpha 16
Studio384 Apr 12, 2023
a8b5af7
Rename square-p to rectangle-p, redesign
Studio384 Apr 19, 2023
59438d4
Add to CSS
Studio384 Apr 19, 2023
4755e79
Update dependencies
Studio384 Apr 19, 2023
a435211
Allow customizing animation speed
Studio384 Apr 19, 2023
455fff8
Add docs page
Studio384 Apr 19, 2023
30210e3
Fix variable name
Studio384 Apr 19, 2023
f80995a
Valkyrie 1.0 alpha 17
Studio384 Apr 19, 2023
5ffd2fd
Fix message icon
Studio384 Apr 28, 2023
b543953
Add pager and speaker-grill icon
Studio384 Apr 28, 2023
f373e29
Valkyrie 1.0 alpha 18
Studio384 May 2, 2023
2eee73d
Valkyrie 1.0 alpha 18
Studio384 May 2, 2023
8e374c0
Add circle dashed and share, update list ordered and blf
Studio384 May 11, 2023
e50da5a
Update dependencies
Studio384 May 11, 2023
ab987cd
Valkyrie 1.0 alpha 19
Studio384 May 11, 2023
d9757ac
Add door icon
Studio384 May 30, 2023
002ace5
Update dependencies
Studio384 May 30, 2023
9548f3c
Valkyrie 1.0 alpha 20
Studio384 May 30, 2023
80369f2
Add pin icons
Studio384 Jun 12, 2023
7be80cf
Update dependencies
Studio384 Jun 12, 2023
8232fd9
Valkyrie 1.0 alpha 21
Studio384 Jun 12, 2023
32aece1
Update pin icons, add sidebar
Studio384 Jun 12, 2023
60320de
Update translate icon
Studio384 Jun 12, 2023
5a68233
Fix ttranslate
Studio384 Jun 12, 2023
b26383a
Update dependencies
Studio384 Jun 12, 2023
6af3ff1
Valkyrie 1.0 alpha 22
Studio384 Jun 12, 2023
f95048c
Add toggle on/off icon
Studio384 Jun 15, 2023
24d7080
Update dependencies
Studio384 Jun 15, 2023
7247a05
Valkyrie 1.0 alpha 23
Studio384 Jun 15, 2023
69d1993
Fix broken server icon
Studio384 Jun 30, 2023
f412eb5
Fix server and smartphone icon
Studio384 Jul 13, 2023
deb553a
Merge branch '1.0' of https://github.com/sippy-platform/valkyrie into…
Studio384 Jul 13, 2023
216a624
Add chalkboard-person
Studio384 Jul 13, 2023
2c016a3
Update dependencies
Studio384 Jul 13, 2023
25511f1
Add life ring icon
Studio384 Jul 13, 2023
ae48d8c
Valkyrie 1.0 alpha 24
Studio384 Jul 13, 2023
b4ce54d
Fix chalkboard-person icon
Studio384 Jul 13, 2023
9a71405
Valkyrie 1.0 alpha 25
Studio384 Jul 13, 2023
08b6bad
Update dependencies
Studio384 Aug 9, 2023
aa9c846
Add key icon
Studio384 Aug 9, 2023
3b2af45
Update dependencies
Studio384 Aug 9, 2023
325016a
Add pages
Studio384 Aug 9, 2023
30bd950
Update description
Studio384 Aug 9, 2023
c7c505a
Update dependencies
Studio384 Aug 9, 2023
44e0648
Downgrade dependencies
Studio384 Aug 9, 2023
5a339e3
Clenaup icon design
Studio384 Aug 9, 2023
816f44f
Fix pagination
Studio384 Aug 9, 2023
0a9c457
Revamp icon grid
Studio384 Aug 9, 2023
13d0e2b
Refresh icon demo
Studio384 Aug 9, 2023
785d60c
Fix tag colors
Studio384 Aug 9, 2023
6b04d25
Reset page on search
Studio384 Aug 9, 2023
3d7235f
Revamp header design
Studio384 Aug 9, 2023
4d9f1a5
Valkyrie 1.0 alpha 26
Studio384 Aug 9, 2023
bdc4b54
Add Valkyrie favicon
Studio384 Aug 10, 2023
566ff76
Refresh home and details page
Studio384 Aug 10, 2023
cd4fdd3
Add missing life-ring icon page
Studio384 Aug 10, 2023
b49edcf
Update dependencies
Studio384 Aug 11, 2023
4b1221c
Add created and updated to docs pages
Studio384 Aug 11, 2023
f6aa45b
Valkyrie 0.1.0 documentation
Studio384 Aug 11, 2023
03d3d34
Valkyrie 0.2 documentation
Studio384 Aug 11, 2023
8a50d5d
Valkyrie 0.3 and 0.4 documentation
Studio384 Aug 11, 2023
f75487c
Valkyrie 0.5 documentation
Studio384 Aug 11, 2023
7288fac
Valkyrie 0.6 documentation
Studio384 Aug 11, 2023
5f471ab
Valkyrie 0.7 documentation
Studio384 Aug 11, 2023
1475794
Valkyrie 0.8 documentation
Studio384 Aug 11, 2023
7272ab6
Valkyrie 0.9 documentation
Studio384 Aug 11, 2023
613547c
Valkyrie 0.10 documentation
Studio384 Aug 11, 2023
d4f3c45
Valkyrie 0.11 and 0.12 documentation
Studio384 Aug 11, 2023
5eb1919
Valkyrie 0.13 documentation
Studio384 Aug 11, 2023
7a6e311
Valkyrie 0.14 and 0.16 documentation
Studio384 Aug 11, 2023
3cedf27
Valkyrie 0.17 and 0.18 documentation
Studio384 Aug 11, 2023
17ddb4e
Valkyrie 0.19 documentation
Studio384 Aug 11, 2023
cd0951c
Valkyrie 0.20 and 0.21 documentation
Studio384 Aug 11, 2023
65eb945
Valkyrie 1.0 alpha 1 documentation
Studio384 Aug 11, 2023
6a64496
Valkyrie 1.0 alpha 2 and 3 documentation
Studio384 Aug 11, 2023
c0758cd
Valkyrie 1.0 alpha 6, 7 and 8 documentation
Studio384 Aug 11, 2023
7a5dd2b
Valkyrie 1.0 alpha 9 and 11 documentation
Studio384 Aug 11, 2023
a8b74d8
Valkyrie 1.0 alpha 12, 13 and 14 documentation
Studio384 Aug 11, 2023
294d895
Valkyrie 1.0 alpha 18, 19 and 20 documentation
Studio384 Aug 11, 2023
f0ade64
Valkyrie 1.0 alpha 21, 22, 23, 24 and 26 documentation
Studio384 Aug 11, 2023
6f1d89e
Rename pin to thumbstack
Studio384 Aug 11, 2023
3ad8772
Update server icon
Studio384 Aug 14, 2023
82b0c5e
Update dependencies
Studio384 Aug 14, 2023
11e7389
Update docs dependencies
Studio384 Aug 14, 2023
f6b8957
Update table icons, fix tag icons
Studio384 Aug 23, 2023
2c700bc
Update dependencies
Studio384 Aug 23, 2023
fea2b17
Remove font and CSS generation
Studio384 Aug 23, 2023
a058928
Fix missing iterator key
Studio384 Aug 23, 2023
dd0c1e4
Update package-lock.json
Studio384 Aug 23, 2023
2fce8d0
Merge pull request #52 from sippy-platform/less-css
Studio384 Aug 23, 2023
eb3c0ef
Run pages when running prod build
Studio384 Aug 23, 2023
b8ae331
Fix type import
Studio384 Aug 23, 2023
692ab65
Remove font from files
Studio384 Aug 23, 2023
979e21d
Update circle-dashed to use rounded corners
Studio384 Aug 23, 2023
3078a59
Update chart-pie design
Studio384 Aug 23, 2023
0f5b03b
Valkyrie 1.0 alpha 28
Studio384 Aug 23, 2023
a7d954f
Add new calendar icons
Studio384 Aug 30, 2023
9cc7562
Update dependencies
Studio384 Aug 30, 2023
7f0569e
Update docs dependencies
Studio384 Aug 30, 2023
4ee248e
Valkyrie 1.0 alpha 29
Studio384 Sep 1, 2023
68b44af
Add min icon
Studio384 Sep 5, 2023
604f65e
Update dependencies
Studio384 Sep 5, 2023
e85ea68
Valkyrie 1.0 alpha 30
Studio384 Sep 5, 2023
116a49f
Start implementing a new docs website
Studio384 Sep 5, 2023
b933f25
Experiment with yaml and json
Studio384 Sep 5, 2023
02f2960
Add icon page for docs
Studio384 Sep 6, 2023
283956e
Fix json, update generators
Studio384 Sep 6, 2023
911202b
Support searching on tags and categories
Studio384 Sep 6, 2023
df37f0e
Use relative Valkyrie, reduce icons per page, update Usage, update la…
Studio384 Sep 6, 2023
0e1a2ac
Add clear button to search
Studio384 Sep 6, 2023
72d025d
Drop Yaml from new docs
Studio384 Sep 6, 2023
84fd535
Drop old docs
Studio384 Sep 6, 2023
5263c28
Use @emotion/css instead of MUI
Studio384 Sep 12, 2023
be1e7b7
Merge pull request #53 from sippy-platform/docs
Studio384 Sep 12, 2023
612607e
Update readme
Studio384 Sep 12, 2023
f4fb7fa
Expand usage documentation
Studio384 Sep 12, 2023
a080444
Fix incorrectly generated contents, support generating categories
Studio384 Sep 12, 2023
51b11da
Add categories support
Studio384 Sep 12, 2023
2e1314d
Update categories and tags
Studio384 Sep 12, 2023
3090b1c
Add icons
Studio384 Sep 12, 2023
fdbfd28
Add category filter
Studio384 Sep 12, 2023
bece395
Add compare icon
Studio384 Sep 13, 2023
785c964
Valkyrie 1.0 alpha 31
Studio384 Sep 13, 2023
941581a
Bump docs version
Studio384 Oct 2, 2023
581df4a
Add arrow-right-[from/to]-file icos
Studio384 Nov 2, 2023
93cb763
Update documentation
Studio384 Nov 2, 2023
da717aa
Update Docs dependencies
Studio384 Nov 2, 2023
faab74e
Valkyrie 1.0 alpha 32
Studio384 Nov 2, 2023
91034aa
Fix file icon
Studio384 Nov 6, 2023
422cf24
Add cloud up/download
Studio384 Nov 7, 2023
97b4d10
Update dependencies
Studio384 Nov 7, 2023
3b2193d
Update docs dependencies
Studio384 Nov 7, 2023
821565a
Valkyrie 1.0 alpha 33
Studio384 Nov 7, 2023
6720a84
Add people and person xmark versions
Studio384 Nov 10, 2023
f2239c0
Update dependencies
Studio384 Nov 10, 2023
1770069
Valkyrie 1.0 alpha 34
Studio384 Nov 10, 2023
6b240d5
Update Valkyrie dependencies
Studio384 Dec 20, 2023
e5137e5
Update documentation dependencies
Studio384 Dec 20, 2023
0f62430
Add dice icosn
Studio384 Jan 9, 2024
5dc98c2
Cleanup icons
Studio384 Jan 9, 2024
4a624ec
Update dependences
Studio384 Jan 9, 2024
28779c1
Add dice to maps category
Studio384 Jan 9, 2024
418fa3c
Add export, update arrow-down-from-cloud
Studio384 Jan 9, 2024
6ac6033
Valkyrie 1.0 alpha 35
Studio384 Jan 9, 2024
cbefbfd
Add Flask icon
Studio384 Jan 24, 2024
96dc6d9
Update dependencies
Studio384 Jan 24, 2024
f060dad
Update doc dependencies
Studio384 Jan 24, 2024
cb43d4e
Add command icon
Studio384 Jan 25, 2024
841a7a2
Valkyrie 1.0 alpha 36
Studio384 Jan 25, 2024
efafc8f
Add broom icon
Studio384 Jan 26, 2024
c406694
Valkyrie 1.0 alpha 37
Studio384 Jan 26, 2024
762046c
Add default transition animation
Studio384 Jan 30, 2024
4efbb96
Fix rotate class not being applied when 0
Studio384 Jan 30, 2024
6c5532e
Add variable documentation
Studio384 Jan 30, 2024
fa5dc72
Add beat animation
Studio384 Jan 30, 2024
b93e609
Rename easing to timing function
Studio384 Jan 30, 2024
5174cd6
Add spinner icon
Studio384 Jan 30, 2024
788c436
Add spin pulse documentation
Studio384 Jan 30, 2024
48e664e
Add timing reduction to docs
Studio384 Jan 30, 2024
8fb03f0
Redesign volume and shuffle
Studio384 Jan 30, 2024
54c8c2e
Valkyrie 1.0 alpha 38
Studio384 Jan 30, 2024
c307e39
Add style to props interface
Studio384 Feb 1, 2024
c94e7fd
Fix defaults triggereing excessive styling
Studio384 Feb 1, 2024
c86b9d3
Fix overwrite of css variables
Studio384 Feb 1, 2024
630c846
Update dependencies
Studio384 Feb 1, 2024
f87d96d
Various icon refreshes, rename ellipsis
Studio384 Feb 19, 2024
4a9e5e7
Update dependencies
Studio384 Feb 19, 2024
e95eed1
Fix creation date
Studio384 Feb 19, 2024
dd74c0f
Drop Redux
Studio384 Feb 19, 2024
3f8fecb
Fix App component
Studio384 Feb 19, 2024
28ce0d7
Update categories
Studio384 Feb 19, 2024
5f295fb
Port over various type fixes
Studio384 Feb 19, 2024
0ee5c14
Add category size to icons overview
Studio384 Feb 19, 2024
00a4960
Type update for icon, drop empty categories
Studio384 Feb 19, 2024
ae32ad7
Valkyrie 1.0 alpha 39
Studio384 Feb 19, 2024
93a2543
Update dependencies
Studio384 Mar 5, 2024
2b5184f
Add grip icons, sort icon
Studio384 Mar 11, 2024
cf7af27
Update dependencies
Studio384 Mar 11, 2024
be55d60
Valkyrie 1.0 alpha 40
Studio384 Mar 11, 2024
6e4c72b
Update dependencies
Studio384 Mar 18, 2024
60f074a
Update grip dots icons, import folder-image from amicons
Studio384 Mar 18, 2024
c4ce0d4
Valkyrie 1.0 alpha 41
Studio384 Mar 18, 2024
495a9e2
Update dependencies
Studio384 Apr 26, 2024
dda7341
Add keyboard icons, bars-uneven
Studio384 Apr 26, 2024
983cc9c
Fix bars icon
Studio384 Apr 26, 2024
502b2e9
Valkyrie 1.0 alpha 42
Studio384 Apr 26, 2024
ad3e034
Update version number
Studio384 Apr 26, 2024
37a83c1
Add bel icon
Studio384 Apr 26, 2024
3c346d0
Valkyrie 1.0 alpha 43
Studio384 Apr 26, 2024
6631458
Add sort icons
Studio384 May 7, 2024
14d1770
Add horizontal arrows
Studio384 May 7, 2024
6361d0d
Rename icons
Studio384 May 7, 2024
b1cc6b8
Add support for fade and add support for changing pulse
Studio384 May 7, 2024
b29cae9
Revamp documentation
Studio384 May 7, 2024
fc5d09b
Add deploy workflow
Studio384 May 7, 2024
48a0b62
Valkyrie 1.0 alpha 44
Studio384 May 7, 2024
eca9e20
Update dependencies
Studio384 May 16, 2024
b00154c
Update check design
Studio384 May 16, 2024
bd0a932
Update circle-check
Studio384 May 16, 2024
d10c96a
Update dependencies
Studio384 May 29, 2024
54cb31e
Add password icon
Studio384 May 29, 2024
f06061e
Add drag keyword
Studio384 May 29, 2024
3944d8d
More keywords
Studio384 May 29, 2024
ca2dcbc
Add white logo variant
Studio384 May 29, 2024
8c0f6f3
Valkyrie 1.0 alpha 45
Studio384 May 29, 2024
d31a663
Update dependencies
Studio384 Jun 17, 2024
2572f22
Add cloud softphone icon
Studio384 Jun 17, 2024
8313cc1
Valkyrie 1.0 alpha 46
Studio384 Jun 17, 2024
e466592
Add external link icon
Studio384 Jun 24, 2024
8748a6f
Rename grip dots variant, add ellipsis vertical
Studio384 Jun 24, 2024
7cf146a
Update dependencies
Studio384 Jun 24, 2024
11761e9
Valkyrie 1.0 alpha 47
Studio384 Jun 24, 2024
9cd7677
Update dependencies
Studio384 Jul 3, 2024
c1eb845
Add teams icon
Studio384 Jul 3, 2024
e814470
Update cloud softphone icon
Studio384 Jul 3, 2024
4a570e6
Update cloud softphone
Studio384 Jul 3, 2024
50dffbb
Update changelog
Studio384 Jul 3, 2024
023e59a
Add Yealink and Fanvil icon
Studio384 Jul 3, 2024
f004b7a
Valkyrie 1.0.0-alpha.48
Studio384 Jul 3, 2024
ab9953f
Update dependencies
Studio384 Jul 8, 2024
c429370
Correct naming of thumbtack icons
Studio384 Jul 8, 2024
880eb70
Update dependencies
Studio384 Aug 29, 2024
fa49aa9
Add Windows and Apple icon
Studio384 Sep 5, 2024
92c1e88
Update dependencies
Studio384 Oct 16, 2024
b98c61c
Add moped, plate-utensils, receipt, shopiing-cart, wallet
Studio384 Oct 16, 2024
1a8bf73
Allow classes to apply to the span element
Studio384 Oct 16, 2024
bb29d14
Update dependencies
Studio384 Oct 17, 2024
c1b0f88
Add glass and burger glass icon
Studio384 Oct 17, 2024
cd3c1ed
Clean-up angles-y icon, add angles-x
Studio384 Oct 17, 2024
7056053
Valkyrie 1.0 alpha 49
Studio384 Oct 17, 2024
59fbd27
Fix build errors
Studio384 Oct 17, 2024
bd27f2e
Add new icons
Studio384 Nov 12, 2024
3872ddb
Make changelog top level option
Studio384 Nov 13, 2024
9aaf466
Replace hangup icon
Studio384 Nov 13, 2024
a95aab1
Valkyrie 1.0 alpha 50
Studio384 Nov 13, 2024
87d54af
Update meta data
Studio384 Nov 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
26 changes: 0 additions & 26 deletions .fantasticonrc.js

This file was deleted.

75 changes: 75 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Deploy to GitHub Pages

on:
push:
branches: ['1.0']
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Production build
run: npm run prod
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: valkyrieicons
path: |
dist
node_modules

deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Download artifact
id: download
uses: actions/download-artifact@v4
with:
name: valkyrieicons
- name: Install dependencies
if: steps.download.outcome == 'success'
run: npm install
- name: Build
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
/node_modules
/dist
.DS_Store
/.hugo_build.lock
/_site/
/node_modules/
/resources/
/dist/
4 changes: 2 additions & 2 deletions .svg-to-tsrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"srcFiles": ["./icons/**/*.svg"],
"outputDirectory": "./src",
"interfaceName": "ValkyrieIcon",
"interfaceName": "IValkyrieIcon",
"typeName": "Valkyrie",
"prefix": "vi",
"fileName": "Valkyrie",
"additionalModelFile": "./src",
"compileSources": true,
"completeIconSetName": "valkyrieSet"
}
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ npm install @sippy-platform/valkyrie

Valkyrie includes a number of ways to use it. Our package will include the individual SVG files, a React-component and JavaScript implementation with TypeScript definitions, as well as an old-school webfont.

# 216 icons
# 255 icons
[Available on Figma](https://www.figma.com/file/jeP1aSRulegRxHDegrrmWc/Valkyrie?node-id=1%3A11358)

# About
Valkyrie is an iconset designed for use in the Mellow Design Language. Our goal is to provide a highly-optimized set of icons that are custom made for Sippy and any future environments required. As such, Valkyrie will mostly include iconography related to basic UI (arrows, menu icons, etc.) and phone iconography (voicemail, call directions, etc.).
Valkyrie is an iconset designed for use in the Mellow Design Language. Our goal is to provide a highly-optimized set of icons that are custom made for Sippy and any future environments required. As such, Valkyrie will mostly include iconography related to basic UI (arrows, menu icons, etc.) and phone iconography (voicemail, call directions, etc.) required for My Sippy, and other iconography required for marketing including Sippy.cloud.

# License
AGPL v3
117 changes: 117 additions & 0 deletions build/generate-library.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
#!/usr/bin/env node

"use strict";

const fs = require("fs").promises;
const fst = require("fs");
const path = require("path");
const picocolors = require("picocolors");

const iconsDir = path.join(__dirname, "../docs/public/data/icons");
const pagesDir = path.join(__dirname, "../docs/src/data/");

function getReactImportName(string) {
return `vi${string
.split("-")
.map(word => {
return word[0].toUpperCase() + word.substring(1);
})
.join("")}`;
}

async function main(file) {
const iconFilePath = path.join(iconsDir, file);
const iconFile = fst.readFileSync(iconFilePath);

let iconJson = {};

try {
iconJson = JSON.parse(iconFile);
} catch (e) {
console.log(iconFilePath);
}

const iconBasename = path.basename(file, path.extname(file));
const iconTitle = getReactImportName(iconBasename);

const jsonTemplate = `
{
component: '${iconTitle}',
categories: ${JSON.stringify(iconJson.categories)},
tags: ${JSON.stringify(iconJson.tags)},
slug: '${iconBasename}',
icon: ${iconTitle}
}`;

return [`${iconTitle}`, jsonTemplate, iconJson.categories];
}

(async () => {
try {
const timeLabel = picocolors.cyan(`Library generation finished`);

console.log(picocolors.cyan(`Library generation started`));
console.time(timeLabel);

const files = await fs.readdir(iconsDir);

const names = [];
const configs = [];
let categories = new Set();

// Read content from each icon
await Promise.all(
files.map(async file => {
const [name, config, cats] = await Promise.resolve(main(file));

names.push(name);
configs.push(config);

cats.map(cat => {
categories.add(cat);
});
})
);

categories = Array.from(categories).sort();

const template = `
import { ${names.map(icon => `${icon}`)} } from '@sippy-platform/valkyrie';

const icons = [${configs.map(page => `${page}`)}
];

export default icons;`;

await fs.writeFile(path.join(pagesDir, `icons.ts`), template);

const categoriesTemplate = `
import { viCircleDashed } from '@sippy-platform/valkyrie';

const categories = [${categories.map(
cat => `
{
slug: "${cat}",
title: "${cat}",
icon: viCircleDashed
}`
)}
];

export default categories;`;

// await fs.writeFile(path.join(pagesDir, `categories.ts`), categoriesTemplate)

const filesLength = files.length;

console.log(
picocolors.green("\nSuccess, %s icon%s written to library!"),
filesLength,
filesLength !== 1 ? "s" : ""
);
console.timeEnd(timeLabel);
} catch (error) {
console.error(error);
process.exit(1);
}
})();
74 changes: 74 additions & 0 deletions build/generate-pages.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#!/usr/bin/env node

"use strict";

const fs = require("fs").promises;
const path = require("path");
const picocolors = require("picocolors");

const version = require("../package.json").version;

const iconsDir = path.join(__dirname, "../icons/");
const pagesDir = path.join(__dirname, "../docs/public/data/icons/");

const VERBOSE = process.argv.includes("--verbose");

function capitalizeFirstLetter(string) {
return (string.charAt(0).toUpperCase() + string.slice(1))
.split("-")
.join(" ");
}

async function main(file) {
const iconBasename = path.basename(file, path.extname(file));
const iconTitle = capitalizeFirstLetter(iconBasename);
const pageName = path.join(pagesDir, `${iconBasename}.json`);

const pageTemplate = `{
"title": "${iconTitle}",
"categories": [],
"tags": [],
"created": "${version.substring(0, version.indexOf("-"))}",
"updated": "${version.substring(0, version.indexOf("-"))}"
}`;

try {
await fs.access(pageName, fs.F_OK);

if (VERBOSE) {
console.log(
`☑️ ${picocolors.cyan(iconBasename)}: Already exists, skipping`
);
}
} catch {
await fs.writeFile(pageName, pageTemplate);
console.log(
`✅ ${picocolors.cyan(iconBasename)}: ${picocolors.green("Page created")}`
);
}
}

(async () => {
try {
const timeLabel = picocolors.cyan(`Page generation finished`);

console.log(picocolors.cyan(`Page generation started`));
console.time(timeLabel);

const files = await fs.readdir(iconsDir);

await Promise.all(files.map(file => main(file)));

const filesLength = files.length;

console.log(
picocolors.green("\nSuccess, %s page%s created!"),
filesLength,
filesLength !== 1 ? "s" : ""
);
console.timeEnd(timeLabel);
} catch (error) {
console.error(error);
process.exit(1);
}
})();
13 changes: 13 additions & 0 deletions docs/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions docs/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VALKYRIE_ENV='production'
VALKYRIE_APP_TITLE='Valkyrie Docs'
Loading